TypeScript and Python SDK examples

Use these examples to try a specific Composio feature in your own project. Start with a walkthrough for complete setup instructions, or open a source file alongside its guide.

Start with a walkthrough

Find source code by task

These are selected examples from ts/examples, python/examples, and the Python TypeSafe provider. The directories also contain experiments and older API examples. Use the linked guide for the current setup and API choices.

TaskTypeScript sourcePython sourceGuide
Run an agent on Cloudflare WorkersOpenAI Worker, Mastra WorkerNot availableWorker setup and deployment
Select and shortlist tools with TypeSafeTypeSafe examplesTypeSafe demoTypeSafe walkthrough
Connect an agent over MCPVercel AI SDKCrewAI, LangChainPython MCP walkthrough, sessions via MCP
Preload tools in a sessionPreload toolsPreload toolsCustom tools walkthrough
Control which tools a session exposesDirect toolsDirect toolsCustom tools walkthrough, configure sessions
Change a session's configurationUpdate a sessionUpdate a sessionSessions
Upload and download sandbox filesSee guideSession filesCSV report walkthrough, remote sandbox
Connect an app for a userConnected accountsAuthorize a sessionAuthentication
Use multiple accounts in one agentMulti-account agentSee walkthroughMultiple accounts walkthrough
Create triggers and receive eventsTrigger examplesTriggersEmail-triggered agent, receive events

Run a repository example

Follow the TypeScript setup or Python setup to install the workspace and configure credentials. Check the selected example for its model provider key and connected-account requirements. Scripts that create connections or triggers make changes in your Composio project.

The LangChain MCP script declares its own dependencies. From the repository root, use uv run --script python/examples/tool_router/langchain_agent.py as shown in the walkthrough.

For a standalone project, use a walkthrough above. To choose a framework first, see SDKs and frameworks.