Prepares the next SDK train: Python `composio` `0.18.2` and the TypeScript packages that the pending Changesets will publish (`@composio/core` and `@composio/slim` `0.15.0`, `@composio/openai` `0.11.0`, `@composio/experimental` and `@composio/json-schema-to-zod` `0.2.2`). No CLI release is part of this train. ## What this PR does - bumps Python core and all 13 provider packages to `0.18.2`, including `python/composio/__version__.py` and the root plus per-provider `uv.lock` files - adds `docs/content/changelog/08-07-26-sdk-releases.mdx`, the combined customer-facing changelog for both SDKs - documents `@composio/core` `0.15.0` in that entry so the generated release PR passes the release-workflow guard - leaves the pending Changesets untouched; the generated release PR remains responsible for npm versioning and publication ## Release sequence 1. Merge this PR. 2. Let Changesets regenerate the "Release: update version" PR, wait for it to go green, then merge it. Merging publishes the TypeScript packages. 3. Tag the resulting `next` commit `py@0.18.2` to publish the Python packages to PyPI. ## Notes - The root `uv.lock` diff carries ~28 lines of marker-annotation churn beyond the version bumps. That is the repo-pinned `uv` `0.8.19` normalising markers the committed lockfile had recorded differently; no dependency versions change. - `@composio/mastra` and the TypeScript providers are unchanged: their declared peer ranges still accept `@composio/core` `0.15.0`, so Changesets does not bump them. ## Verification - `pnpm test:release-workflow` — passes (Python package, runtime, and provider versions agree; both SDK versions documented in the changelog) - `uv run pytest tests/` in `python/` — 925 passed, 35 skipped - `uv run --package composio python -c "import composio"` — reports `0.18.2` - `bun test tests/static/` in `docs/` — 195 pass, 1 pre-existing failure (`getLLMText — version pointer`, also fails on a clean tree) - `bun run types:check` in `docs/` — MDX generation and route typegen succeed; the final `tsc` step could not run locally because `typescript-7` is absent from `docs/node_modules`
Composio Python SDK
Composio gives your AI agents 1000+ pre-authenticated toolkits, per-user sessions, authentication, triggers, and a sandbox. This package is the Python SDK.
- Documentation
- Quickstart
- Changelog
- Dashboard (grab your
COMPOSIO_API_KEYfrom Settings)
Install
Requires Python 3.10+.
pip install composio
Quickstart
Create a session for one of your users and hand its tools to your agent:
from composio import Composio
composio = Composio() # reads COMPOSIO_API_KEY, or pass api_key=...
session = composio.create(user_id="user_123")
tools = session.tools() # OpenAI-format tool definitions by default
By default a session gets meta tools that discover, authenticate, and execute app tools at runtime, so you don't load hundreds of tool definitions into context. Store session.session_id and reuse the session across turns:
session = composio.use(session_id)
See how Composio works for sessions and meta tools, and configuring sessions for restricting toolkits, tools, auth_configs, and connected_accounts on composio.create().
Use with an agent framework
Provider packages adapt session.tools() to your framework's native tool format. With OpenAI Agents:
pip install composio composio-openai-agents openai-agents
from composio import Composio
from composio_openai_agents import OpenAIAgentsProvider
from agents import Agent, Runner
composio = Composio(provider=OpenAIAgentsProvider())
session = composio.create(user_id="user_123")
tools = session.tools()
agent = Agent(
name="Personal Assistant",
instructions="You are a helpful assistant. Use Composio tools to take action.",
tools=tools,
)
result = Runner.run_sync(starting_agent=agent, input="Summarize my emails from today")
print(result.final_output)
Other Python providers: composio-openai, composio-anthropic, composio-claude-agent-sdk, composio-langchain, composio-langgraph, composio-llamaindex, composio-crewai, composio-autogen, composio-gemini, composio-google, composio-google-adk. Don't see yours? Build a custom provider.
MCP
Every session also exposes a hosted MCP endpoint. Pass mcp=True and point Claude, Cursor, or any MCP client at it:
from composio import Composio
composio = Composio()
session = composio.create(user_id="user_123", mcp=True)
print(session.mcp.url) # MCP endpoint for this session
print(session.mcp.headers) # auth headers for the endpoint
See sessions via MCP.
Authentication
Sessions manage connections for you by default; the agent walks the user through OAuth with the session's meta tools. To drive the flow yourself, authorize a toolkit from the session:
connection_request = session.authorize("gmail")
print(connection_request.redirect_url) # send the user here to approve access
connection_request.wait_for_connection()
See authentication for auth configs, custom OAuth apps, and connection lifecycle.
Triggers
Subscribe to events from connected apps (new email, new commit, and so on) and react to them:
from composio import Composio
composio = Composio()
trigger = composio.triggers.create(
slug="GITHUB_COMMIT_EVENT",
user_id="user_123",
trigger_config={"owner": "composiohq", "repo": "composio"},
)
subscription = composio.triggers.subscribe()
@subscription.handle(trigger_id=trigger.trigger_id)
def handle_event(data):
print("Event received:", data)
subscription.wait_forever()
subscribe() streams events over a WebSocket for local development. In production, register a webhook URL and parse deliveries with composio.triggers.parse(). See setting up triggers.
Development
This package lives in the Composio SDK monorepo under python/. See the contribution guidelines to get set up.