Skip to content

Integrate Composio SDK so agents can use connected SaaS tools - #43

Open
archit-alt wants to merge 1 commit into
tashfeenahmed:mainfrom
archit-alt:feat/composio-integration
Open

Integrate Composio SDK so agents can use connected SaaS tools#43
archit-alt wants to merge 1 commit into
tashfeenahmed:mainfrom
archit-alt:feat/composio-integration

Conversation

@archit-alt

Copy link
Copy Markdown

Closes the "no integration catalog" gap called out in the README's honest-scope section: agents can now act inside connected SaaS tools (Gmail, GitHub, Slack, …) via Composio. Fully opt-in behind COMPOSIO_API_KEY and dormant (no behaviour change) when unset.

Design

The Composio SDK + API key stay server-side only — agents never see them. They reach Composio through the same MCP + /agent-api seam they already use, so nothing bypasses the executor:

  • api/src/lib/composio.ts — server-side @composio/core wrapper (discover, execute, list connections) with a read/write approval heuristic.
  • executor.ts — a new composio_execute action that inherits CircleChat's scope/risk/approval gating and durable replay (approved outbound calls run server-side from their stored payload). Gated by COMPOSIO_APPROVAL (all | writes | off; default all).
  • /agent-api/composio/{status,tools} — read-only discovery; execution flows through the gated /agent-api/act, which now returns Composio tool results.
  • api/scripts/composio-mcp.mjs — dep-free stdio MCP shim (list/execute/connections) registered into Hermes/OpenClaw by the equip layer, so no key ever enters an agent container.
  • examples/composio-agent/ — reference webhook agent (Claude via @composio/anthropic) to prove the loop without the containerised runtime.
  • Docs (docs/composio.md), README (Can't → Can), .env.example, and compose wiring.

Verified locally against a live Composio key

  • /agent-api/composio/tools returns real tool slugs.
  • composio_execute for a write (e.g. GMAIL_SEND_EMAIL) is approval-gated — an approval card opens and nothing runs until a human approves.
  • composio_execute for a read runs end-to-end through the executor and calls Composio.

Notes

  • @composio/core requires zod ^3.25; the api lockfile is bumped accordingly.
  • Approval-gated by default keeps the "governed, auditable" posture — set COMPOSIO_APPROVAL=writes to auto-run read-only tools, or off on a trusted single-tenant deploy.

🤖 Generated with Claude Code

CircleChat's bundled agents could plan, code, browse, and ship artifacts but
couldn't log into existing tools — there was no integration catalog. This wires
in Composio so any agent gains a toolset backed by the user's connected accounts
(Gmail, GitHub, Slack, CRMs, …), opt-in via COMPOSIO_API_KEY and dormant when
unset.

Design keeps the SDK and API key server-side only; agents reach Composio through
the same MCP + /agent-api seam they already use, so nothing bypasses the executor:

- lib/composio.ts: server-side @composio/core wrapper (discover, execute, list
  connections) with a read/write approval heuristic.
- executor: new composio_execute action that inherits scope/risk/approval gating
  and durable replay — approved outbound calls run server-side from their stored
  payload. Gated by COMPOSIO_APPROVAL (all|writes|off; default all).
- /agent-api/composio/{status,tools}: read-only discovery; execution flows through
  the gated /agent-api/act, which now returns composio tool results.
- scripts/composio-mcp.mjs: dep-free stdio MCP shim (list/execute/connections)
  registered into Hermes/OpenClaw by the equip layer — no key ever enters a
  container.
- examples/composio-agent: reference webhook agent (Claude via @composio/anthropic)
  to prove the loop without the containerised runtime.
- docs/composio.md + README + .env.example + compose wiring.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant