Using as a native tool
Tool Router can be used as a single native tool with any AI framework. The tool handles search, authentication, and execution internally.
Examples for popular frameworks
Jump to examples for:
- OpenAI - Python, TypeScript
- Vercel AI SDK - TypeScript
OpenAI
Installation
Usage
Create a Tool Router session and use it as a native tool with OpenAI Agents SDK:
- Set your
COMPOSIO_API_KEYenvironment variable with your API key from Settings. - Set your
OPENAI_API_KEYenvironment variable with your OpenAI API key.
Vercel AI SDK
Installation
Usage
Create a Tool Router session and use it as a native tool with Vercel AI SDK:
- Set your
COMPOSIO_API_KEYenvironment variable with your API key from Settings. - Set your
ANTHROPIC_API_KEYenvironment variable with your Anthropic API key.
TypeScript