Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
Mirrored from https://github.com/Camo67/composio.git
Synced Nov 21, 03:37 UTC
| 1 | # Composio TypeScript workspace |
| 2 | |
| 3 | This directory contains the TypeScript half of the Composio SDK monorepo: the core SDK, provider adapters, the CLI, examples, and end-to-end tests. For an overview of Composio itself, start at the [root README](../README.md) and [docs.composio.dev](https://docs.composio.dev). |
| 4 | |
| 5 | If you just want to use the SDK: |
| 6 | |
| 7 | ```bash |
| 8 | npm install @composio/core |
| 9 | ``` |
| 10 | |
| 11 | ```typescript |
| 12 | import { Composio } from '@composio/core'; |
| 13 | |
| 14 | const composio = new Composio({ apiKey: process.env.COMPOSIO_API_KEY }); |
| 15 | |
| 16 | const session = await composio.create('user_123'); |
| 17 | const tools = await session.tools(); |
| 18 | ``` |
| 19 | |
| 20 | See the [`@composio/core` README](packages/core/README.md) and the [quickstart](https://docs.composio.dev/docs/quickstart) for the full flow, including provider setup for your agent framework. |
| 21 | |
| 22 | ## Packages |
| 23 | |
| 24 | Published packages: |
| 25 | |
| 26 | | Package | Description | |
| 27 | |---------|-------------| |
| 28 | | [`@composio/core`](packages/core) | The Composio SDK. Ships its TypeScript source and SDK docs so installed copies are inspectable by coding agents. | |
| 29 | | [`@composio/slim`](packages/slim) | Same API as `@composio/core` without the packaged source and docs; smaller install. | |
| 30 | | [`composio` CLI](packages/cli) | Standalone CLI binary: search, execute, and script tools from your shell. | |
| 31 | | [`@composio/*` providers](packages/providers) | Adapters that format Composio tools for agent frameworks (OpenAI, Anthropic, Vercel AI SDK, LangChain, and more). See the [provider table](../README.md#providers). | |
| 32 | | [`@composio/experimental`](packages/experimental) | Experimental integrations, currently the Pi provider. | |
| 33 | | [`@composio/json-schema-to-zod`](packages/json-schema-to-zod) | JSON Schema to Zod conversion. | |
| 34 | |
| 35 | Internal (unpublished) packages: `cli-keyring` supports the CLI; `ts-builders` generates TypeScript source. |
| 36 | |
| 37 | ## Layout |
| 38 | |
| 39 | ```text |
| 40 | ts/ |
| 41 | packages/ Published and internal packages (see above) |
| 42 | examples/ Runnable examples per feature and framework |
| 43 | e2e-tests/ Runtime E2E tests (Node, Cloudflare Workers, CLI) |
| 44 | docs/ Workspace SDK docs: API notes and internal guides |
| 45 | scripts/ Build, validation, and scaffolding scripts |
| 46 | vendor/ Read-only reference submodules; do not edit |
| 47 | ``` |
| 48 | |
| 49 | ## Development |
| 50 | |
| 51 | Commands run from the repository root. Install the pinned toolchain first: |
| 52 | |
| 53 | ```bash |
| 54 | mise install |
| 55 | pnpm install |
| 56 | ``` |
| 57 | |
| 58 | Build and verify: |
| 59 | |
| 60 | ```bash |
| 61 | pnpm build:packages # build all TS packages |
| 62 | pnpm typecheck # typecheck all TS packages |
| 63 | pnpm lint:packages # oxlint over ts/packages |
| 64 | pnpm test # package unit tests plus example validation |
| 65 | ``` |
| 66 | |
| 67 | Runtime E2E suites (require credentials): |
| 68 | |
| 69 | ```bash |
| 70 | pnpm test:e2e:node |
| 71 | pnpm test:e2e:cloudflare |
| 72 | pnpm test:e2e:cli |
| 73 | ``` |
| 74 | |
| 75 | Scaffolding: |
| 76 | |
| 77 | ```bash |
| 78 | pnpm create:provider <name> [--agentic] # new provider package |
| 79 | pnpm create:example <name> # new example under ts/examples |
| 80 | ``` |
| 81 | |
| 82 | Changesets are required for changes to published packages; see the [contribution guidelines](../CONTRIBUTING.md). |
| 83 | |
| 84 | ## Support |
| 85 | |
| 86 | - [Documentation](https://docs.composio.dev) |
| 87 | - [Discord community](https://discord.gg/composio) |
| 88 | - [Open an issue](https://github.com/ComposioHQ/composio/issues) |