A collection of AI agents built with Composio's Tool Router, available in both Python and TypeScript/JavaScript.
Composio's Tool Router is an experimental feature that provides AI agents access to 500+ integrated apps through the Model Context Protocol (MCP). It automatically discovers, authenticates, and executes the right tools for any task—from finding relevant tools across integrations to managing authentication and parallel execution.
Learn more about Tool Router →
- Python 3.11+ or Node.js 18+
- Composio API Key
- Anthropic API Key
Python:
cd python
uv sync # or: pip install -r requirements.txt
JavaScript:
cd js
npm install
Create a .env
file in the respective directory (python/
or js/
):
COMPOSIO_API_KEY=your_composio_api_key_here
USER_ID=your_email@example.com
Agent | Description | Python | JavaScript |
---|---|---|---|
Content Generator | Creates social media content with AI videos | python agents/content_generator.py |
npm run content-generator |
Customer Service | Helps with Composio docs and integration queries | python agents/customer_service_agent.py |
npm run customer-service |
Developer | Autonomous coding agent that opens PRs | python agents/developer_agent.py |
npm run developer |
Twitter Lead Gen | Extracts and enriches Twitter leads | python agents/twitter_lead_gen_agent.py |
npm run twitter-lead-gen |
Deep Research | Researches topics and creates detailed reports in Google Docs | python agents/deep_research_agent.py |
npm run deep-research |
Fullstack Developer | Builds fullstack apps with Supabase + Next.js and deploys on Vercel | python agents/fullstack_developer_agent.py |
npm run fullstack-dev |
from claude_agent_sdk import query, ClaudeAgentOptions
from composio import Composio
from dotenv import load_dotenv
load_dotenv()
composio = Composio(api_key=os.getenv("COMPOSIO_API_KEY"))
session = composio.experimental.tool_router.create_session(
user_id=os.getenv("USER_ID")
)
options = ClaudeAgentOptions(
system_prompt="Your agent instructions",
permission_mode='bypassPermissions',
mcp_servers={"tool-router": {'type': 'http', 'url': session.get('url')}}
)
async for message in query(prompt="Your task", options=options):
print(message)
import { query } from '@anthropic-ai/claude-agent-sdk';
import { Composio } from '@composio/core';
const composio = new Composio({ apiKey: process.env.COMPOSIO_API_KEY });
const session = await composio.experimental.toolRouter.createSession(
process.env.USER_ID!
);
for await (const message of query({
prompt: "Your task",
options: {
systemPrompt: "Your agent instructions",
permissionMode: 'bypassPermissions',
mcpServers: { 'tool-router': { type: 'http', url: session.url } }
}
})) {
console.log(message);
}
The Tool Router exposes six meta tools through MCP:
- COMPOSIO_SEARCH_TOOLS - Discover tools across 500+ apps
- COMPOSIO_GENERATE_PLAN - Create step-by-step execution plans
- COMPOSIO_CREATE_CONNECTION - Manage app authentication
- COMPOSIO_EXECUTE_TOOLS - Run up to 20 tools in parallel
- COMPOSIO_PYTHON_SANDBOX - Execute Python code in a sandbox
- COMPOSIO_BASH - Run bash commands in a remote sandbox
Limit which apps agents can access:
# Python
session = composio.experimental.tool_router.create_session(
user_id="user@example.com",
toolkits=["github", "slack", "notion"]
)
// TypeScript
const session = await composio.experimental.toolRouter.createSession(
"user@example.com",
{ toolkits: ["github", "slack", "notion"] }
);
tool-router-agents/
├── python/ # Python agents
│ ├── agents/ # Agent implementations
│ │ └── utils/ # Message formatter
│ └── pyproject.toml
└── js/ # TypeScript/JavaScript agents
├── agents/ # Agent implementations
│ └── utils/ # Message formatter
├── package.json
└── tsconfig.json
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request