The captured-errors pretty-printer in the CLI has two files that export the same `maybeAdviseSpansUsage` symbol: - `ts/packages/cli/src/effect-errors/pretty-print/captured-errors/maybe-advise-spans-usage.ts` (the live one, spelled `advise`), re-exported by `captured-errors/index.ts` and consumed by `format-captured-error.ts`. - `ts/packages/cli/src/effect-errors/pretty-print/captured-errors/maybe-advice-spans-usage.ts` (spelled `advice`), which is never exported through the barrel and never imported anywhere. The `advice` file is a leftover from an `advice -> advise` rename: both files were originally introduced identical, and only the `advise` copy was later updated (its leading `''` became `' '` for color-contrast spacing) and wired up. The `advice` copy has since sat as unreferenced dead code that still returns the stale pre-fix value. It ships in the bundle as dead code and is a copy-paste / confusion hazard. This PR deletes it. No linked issue (self-identified cleanup). Fixes # ## Changes - Delete the unused, stale duplicate `ts/packages/cli/src/effect-errors/pretty-print/captured-errors/maybe-advice-spans-usage.ts`. The live `maybe-advise-spans-usage.ts` is unchanged and remains the only exported/imported copy. ## Type of change - [ ] Bug fix - [ ] New feature - [x] Refactor/Chore - [ ] Documentation - [ ] Breaking change ## How Has This Been Tested? Confirmed the removed file is unreferenced, then ran the CLI's checks with the deletion in place (local Node 26 / pnpm 10; CI will verify the pinned toolchain): - Unreferenced check: searched the repo for both the path `maybe-advice-spans-usage` and the token `advice` under `ts/packages/cli/src/` -> 0 matches. Only the live `./maybe-advise-spans-usage` is re-exported by `captured-errors/index.ts`, and `format-captured-error.ts` imports `maybeAdviseSpansUsage` through that barrel. - Build workspace deps: `pnpm run build:packages` -> all packages built. - Typecheck (required when touching CLI code, per `ts/packages/cli/AGENTS.md`): `pnpm exec turbo typecheck --filter=@composio/cli --force` -> pass, fully re-executed (no cache). A missing-module error would surface here if anything had imported the deleted file. - Lint: `pnpm exec eslint ts/packages/cli/src/effect-errors --ext .ts` -> clean. - Tests: `pnpm exec vitest run` in `ts/packages/cli` -> 720 passed, 1 skipped, 80 files. No regressions. ## Screenshots (if applicable) N/A. ## Checklist - [x] I have read the Code of Conduct and this PR adheres to it - [x] I ran linters/tests locally and they passed - [x] I updated documentation as needed (none needed; internal dead code) - [x] I added tests or explain why not applicable - [x] I added a changeset if this change affects published packages Tests: not applicable. This is a pure deletion of unreachable code with no behavior change; nothing references the file, so there is nothing to regression-test. The live `maybeAdviseSpansUsage` path is already exercised by the existing effect-errors tests via `format-captured-error`. Changeset: not needed. The CLI package is not published to npm and this is an internal, non-published-surface change. ## Additional context Git history for the curious: both files were introduced identical in `333b03c3b`; the live `maybe-advise-spans-usage.ts` diverged in `fe5acc7d7` (leading `''` -> `' '` for color contrast) and became the wired-up copy, leaving `maybe-advice-spans-usage.ts` behind as the stale duplicate removed here. Co-authored-by: Alberto Schiabel <jkomyno@users.noreply.github.com>
This repository contains the official Software Development Kits (SDKs) for Composio, providing seamless integration capabilities for Python and Typescript Agentic Frameworks and Libraries.
Getting Started
TypeScript SDK Installation
# Using npm
npm install @composio/core
# Using yarn
yarn add @composio/core
# Using pnpm
pnpm add @composio/core
Quick start:
import { Composio } from '@composio/core';
// Initialize the SDK
const composio = new Composio({
// apiKey: 'your-api-key',
});
Simple Agent with OpenAI Agents
npm install @composio/openai-agents @openai/agents
import { Composio } from '@composio/core';
import { OpenAIAgentsProvider } from '@composio/openai-agents';
import { Agent, run } from '@openai/agents';
const composio = new Composio({
provider: new OpenAIAgentsProvider(),
});
const userId = 'user@acme.org';
const tools = await composio.tools.get(userId, {
toolkits: ['HACKERNEWS'],
});
const agent = new Agent({
name: 'Hackernews assistant',
tools: tools,
});
const result = await run(agent, 'What is the latest hackernews post about?');
console.log(JSON.stringify(result.finalOutput, null, 2));
// will return the response from the agent with data from HACKERNEWS API.
Python SDK Installation
# Using pip
pip install composio
# Using poetry
poetry add composio
Quick start:
from composio import Composio
composio = Composio(
# api_key="your-api-key",
)
Simple Agent with OpenAI Agents
pip install composio_openai_agents openai-agents
import asyncio
from agents import Agent, Runner
from composio import Composio
from composio_openai_agents import OpenAIAgentsProvider
# Initialize Composio client with OpenAI Agents Provider
composio = Composio(provider=OpenAIAgentsProvider())
user_id = "user@acme.org"
tools = composio.tools.get(user_id=user_id, toolkits=["HACKERNEWS"])
# Create an agent with the tools
agent = Agent(
name="Hackernews Agent",
instructions="You are a helpful assistant.",
tools=tools,
)
# Run the agent
async def main():
result = await Runner.run(
starting_agent=agent,
input="What's the latest Hackernews post about?",
)
print(result.final_output)
asyncio.run(main())
# will return the response from the agent with data from HACKERNEWS API.
For more detailed usage instructions and examples, please refer to each SDK's specific documentation.
Open API Specification
To update the OpenAPI specifications used for generating SDK documentation:
# Pull the latest API specifications from the backend
pnpm api:pull
This command pulls the OpenAPI specification from https://backend.composio.dev/api/v3/openapi.json and updates the local API documentation files.
This is pulled automatically with build step.
Available SDKs
TypeScript SDK (/ts)
The TypeScript SDK provides a modern, type-safe way to interact with Composio's services. It's designed for both Node.js and browser environments, offering full TypeScript support with comprehensive type definitions.
For detailed information about the TypeScript SDK, please refer to the TypeScript SDK Documentation.
Python SDK (/python)
The Python SDK offers a Pythonic interface to Composio's services, making it easy to integrate Composio into your Python applications. It supports Python 3.10+ and follows modern Python development practices.
For detailed information about the Python SDK, please refer to the Python SDK Documentation.
Provider Support
The following table shows which AI frameworks and platforms are supported in each SDK:
| Provider | TypeScript | Python |
|---|---|---|
| OpenAI | ✅ | ✅ |
| OpenAI Agents | ✅ | ✅ |
| Anthropic | ✅ | ✅ |
| LangChain | ✅ | ✅ |
| LangGraph | ✅* | ✅ |
| LlamaIndex | ✅ | ✅ |
| Vercel AI SDK | ✅ | ❌ |
| Google Gemini | ✅ | ✅ |
| Google ADK | ❌ | ✅ |
| Mastra | ✅ | ❌ |
| Cloudflare Workers AI | ✅ | ❌ |
| CrewAI | ❌ | ✅ |
| AutoGen | ❌ | ✅ |
* LangGraph in TypeScript is supported via the @composio/langchain package.
Don't see your provider? Learn how to build a custom provider to integrate with any AI framework.
Packages
Core Packages
| Package | Version |
|---|---|
| TypeScript | |
| @composio/core | |
| Python | |
| composio |
Provider Packages
Utility Packages
| Package | Version |
|---|---|
| @composio/json-schema-to-zod | |
| @composio/ts-builders |
if you are looking for the older sdk, you can find them here
Rube
Rube is a Model Context Protocol (MCP) server built with Composio. It connects your AI tools to 500+ apps like Gmail, Slack, GitHub, and Notion. Simply install it in your AI client, authenticate once with your apps, and start asking your AI to perform real actions like "Send an email" or "Create a task."
It integrates with major AI clients like Cursor, Claude Desktop, VS Code, Claude Code and any custom MCP‑compatible client. You can switch between these clients and your integrations follow you.
Contributing
We welcome contributions to both SDKs! Please read our contribution guidelines before submitting pull requests.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Support
If you encounter any issues or have questions about the SDKs:
- Open an issue in this repository
- Contact our support team
- Check our documentation
