Code Block
Code block styles used across Composio. Syntax highlighting powered by Shiki with the Composio Dark theme.
Download Themes
Preview
Python — Connect an Agentpython
from composio import Composio
client = Composio(api_key="your-api-key")
# Connect a tool
connection = client.connect(
tool="github",
entity_id="user-123",
)
# Execute an action
result = client.execute(
action="github_create_issue",
params={
"repo": "composio/composio",
"title": "New feature request",
"body": "Add support for webhooks",
},
)TypeScript — Initialize Clienttypescript
import { Composio } from "composio-core";
const client = new Composio({
apiKey: process.env.COMPOSIO_API_KEY,
});
// List available tools
const tools = await client.tools.list();
// Execute an action
const result = await client.execute({
action: "slack_send_message",
params: {
channel: "#general",
text: "Hello from Composio!",
},
});Bash — Install & Setupbash
# Install Composio CLI
pip install composio-core
# Login to your account
composio login
# Add a new integration
composio add github
# List connected tools
composio list tools