Code Block

Code Block

Code block styles used across Composio. Syntax highlighting powered by Shiki with the Composio Dark theme.

Specs

Consistent code styling across all Composio surfaces.

FontJetBrains Mono
Size0.85rem
Line Height1.6
ThemeComposio Dark
Background#000000
Text#e5e5e5
Borderrgba(255,255,255,0.1)
Padding1rem 1.25rem

Download Themes

Composio Dark

VS Code / Shiki compatible theme

Composio Light

VS Code / Shiki compatible theme

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

Inline Code

Use composio login to authenticate, then run composio add github to connect your first tool. The apiKey parameter is required for all SDK calls.

Set the environment variable COMPOSIO_API_KEY or pass it directly via Composio({ apiKey: "..." }) when initializing the client. Check connection status with composio whoami.