Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

docs(composio): add README for Composio integration

Steven Enamakelc86448dfa20b
diff --git a/crates/openhuman-core/src/integrations/composio/README.md b/crates/openhuman-core/src/integrations/composio/README.md
index dbcaa37664..0dae953b42 100644
--- a/crates/openhuman-core/src/integrations/composio/README.md
+++ b/crates/openhuman-core/src/integrations/composio/README.md
@@ -49,13 +49,13 @@ triggers) from a real transport failure.
| `crates/openhuman-core/src/integrations/composio/types.rs` | Serde domain types mirroring backend response envelopes (toolkits, connections, tools, execute, triggers, trigger events/history). Includes drift-tolerant `de_string_or_object` deserializers. |
| `crates/openhuman-core/src/integrations/composio/ops/` | RPC-facing `composio_*` operations returning `Outcome<T>`, split by concern (see [Ops layout](#ops-layout)). |
| `crates/openhuman-core/src/integrations/composio/schemas.rs` + `schemas/` (`registry.rs`, `definitions.rs`, `handlers_identity.rs`, `handlers_tools.rs`, `handlers_connections.rs`, `handlers_triggers.rs`, `params.rs`, `util.rs`) | Controller schemas + `handle_*` handlers; `all_controller_schemas` / `all_registered_controllers` (`schemas/registry.rs`). |
-| `crates/openhuman-core/src/integrations/composio/client.rs` + `client/` (`connections.rs`, `factory.rs`, `direct.rs`, `execute.rs`, `triggers.rs`) | `ComposioClient` (thin HTTP wrapper over `IntegrationClient` for backend routes, `client/connections.rs`) + `ComposioClientKind` (Backend/Direct), `create_composio_client` (`client/factory.rs`), and direct-mode v3 helpers (`direct_list_connections`, `direct_list_tools`, `direct_execute`, `direct_authorize`, all in `client/direct.rs`). |
+| `crates/openhuman-core/src/integrations/composio/client.rs` + `client/` (`factory.rs`, `direct.rs`) | Route resolution only: `ComposioRoute` (Backend/Direct) and `resolve_composio_route` (`client/factory.rs`) keep the mode/credential decision and its user-facing errors on the host; the Composio HTTP client itself is the `tinyconnectors` module. `direct_list_connections` / `direct_list_tools` (`client/direct.rs`) are the two direct-mode v3 reads that keep `limit=200` / `toolkit_versions=latest`. |
| `crates/openhuman-core/src/integrations/composio/module_client.rs` | The `tinyconnectors` module bridge: the one `modules`-feature `#[cfg]` switch, `methods` re-exported from `tinyconnectors_bus`, and member-failure classification (`is_unsupported_by_route`, error-prefix peeling). |
| `crates/openhuman-core/src/integrations/composio/tools.rs` + `tools/` (`authorize.rs`, `connect.rs`, `list_connections.rs`, `list_toolkits.rs`, `list_tools.rs`, `execute.rs`, `registry.rs`, `visibility.rs`) | Agent tools (`ComposioListToolkitsTool`, `ComposioListConnectionsTool`, `ComposioAuthorizeTool`, `ComposioConnectTool`, `ComposioListToolsTool`, `ComposioExecuteTool`) + `all_composio_agent_tools`; scope/visibility gating (`resolve_action_scope`, `evaluate_tool_visibility`). |
-| `crates/openhuman-core/src/integrations/composio/tools/direct.rs` + `tools/direct/` (`types.rs`, `connections.rs`, `discovery.rs`, `construction.rs`, `execution.rs`, `http_errors.rs`, `tool_impl.rs`) | Direct-mode Composio tool provider hitting Composio v2/v3 APIs with the user's key (`ComposioTool`, `ComposioAction`, `ComposioConnectedAccount`). |
+| `crates/openhuman-core/src/integrations/composio/tools/direct.rs` + `tools/direct/` (`types.rs`, `connections.rs`, `discovery.rs`, `construction.rs`, `http_errors.rs`) | Slim direct-mode v3 reader (`DirectComposioClient`, `ComposioConnectedAccount`): `/connected_accounts` and `/tools` with the user's key. Not a `Tool`; execution, OAuth and connection management are the module's. |
| `crates/openhuman-core/src/integrations/composio/action_tool.rs` | `ComposioActionTool`: a `Tool` wrapping exactly one Composio action, constructed as a `ToolExposure::Deferred` tool per action of every connected toolkit (`tools/orchestrator_tools.rs`, and `agent/session_host/recorded_tools.rs` when a resumed thread rebuilds its recorded actions), reached by the orchestrator through `tool_search`. |
| `crates/openhuman-core/src/integrations/composio/contract_gate.rs` | Late-bound action contract gate (#4853): on an action's first call this turn, surfaces the full live contract (via `catalog::fetch_live_toolkit_catalog`) as a recoverable tool error before executing, so the retry has the real schema in context. |
-| `crates/openhuman-core/src/integrations/composio/catalog.rs` + `catalog/` (`contract.rs`, `lookups.rs`, `probe.rs`) | Live Composio tool contracts (`fetch_live_toolkit_catalog`, `ToolContract`, in `catalog/contract.rs`): the unfiltered mode-aware `list_tools` schema (backend `ComposioClient::list_tools` or direct v3 `direct_list_tools`) plus a bounded read-only response probe (`probe_tool_output_sample`, `catalog/probe.rs`) when a schema publishes no `output_parameters`. |
+| `crates/openhuman-core/src/integrations/composio/catalog.rs` + `catalog/` (`contract.rs`, `lookups.rs`, `probe.rs`) | Live Composio tool contracts (`fetch_live_toolkit_catalog`, `ToolContract`, in `catalog/contract.rs`): the unfiltered mode-aware `list_tools` schema (the module's `ListTools` member on the backend route, or direct v3 `direct_list_tools`) plus a bounded read-only response probe (`probe_tool_output_sample`, `catalog/probe.rs`) when a schema publishes no `output_parameters`. |
| `crates/openhuman-core/src/integrations/composio/connected_integrations.rs` + `connected_integrations/` (`cache.rs`, `fetch.rs`, `fetch_uncached.rs`) | Cached active-connections lookups (`cached_active_integrations`, `fetch_connected_integrations*`) reconciled against `list_connections`. |
| `crates/openhuman-core/src/integrations/composio/execute_dispatch.rs` | Host entry for running one action: applies egress enforcement/disclosure, then calls the module's `EXECUTE` member (prepare → retry → error mapping all run in `tinyconnectors`). Used by the `composio_execute` agent tool, `tools.composio_execute`, the memory host, LinkedIn enrichment and the output probe. |
| `crates/openhuman-core/src/integrations/composio/execute_prepare.rs` | Local pre-flight argument validation/preparation for action calls. |
@@ -98,7 +98,7 @@ RPC).
From `mod.rs` re-exports:
-- **Client**: `ComposioClient`, `ComposioActionTool`.
+- **Client**: `ComposioRoute`, `resolve_composio_route`, `ComposioActionTool`.
- **Ops**: `cached_active_integrations`, `cached_active_integrations_including_expired`, `connected_set_hash`, `fetch_connected_integrations`, `fetch_connected_integrations_status`, `FetchConnectedIntegrationsStatus`, `invalidate_connected_integrations_cache`.
- **Prompt type**: `ConnectedIntegration` (re-exported from `crate::agent::prompts::types`).
- **Schemas**: `all_composio_controller_schemas`, `all_composio_registered_controllers`.
@@ -140,7 +140,7 @@ Handlers delegate to `ops/`; scope handlers delegate to `ops::user_scopes`. Expo
## Agent tools
-From `tools.rs` (`all_composio_agent_tools`, registered only when `agent::subagent_host::user_is_signed_in_to_composio` is true): `composio_list_toolkits`, `composio_list_connections`, `composio_authorize`, `composio_connect` (inline OAuth approval card, #3993), `composio_list_tools`, `composio_execute`. Plus `ComposioActionTool` (one `Deferred` tool per action, found through `tool_search`, gated by `contract_gate.rs` on first call) and the direct-mode `ComposioTool` provider (`tools/direct.rs`). Scope elevation is deliberately NOT an agent tool; the user toggles it in the UI. Visibility/execution is gated by curated catalogs (`providers::` contract re-exports) + per-toolkit user-scope prefs and sandbox mode; unparseable slugs default to `Write` (fail-closed).
+From `tools.rs` (`all_composio_agent_tools`, registered only when `agent::subagent_host::user_is_signed_in_to_composio` is true): `composio_list_toolkits`, `composio_list_connections`, `composio_authorize`, `composio_connect` (inline OAuth approval card, #3993), `composio_list_tools`, `composio_execute`. Plus `ComposioActionTool` (one `Deferred` tool per action, found through `tool_search`, gated by `contract_gate.rs` on first call). Scope elevation is deliberately NOT an agent tool; the user toggles it in the UI. Visibility/execution is gated by curated catalogs (`providers::` contract re-exports) + per-toolkit user-scope prefs and sandbox mode; unparseable slugs default to `Write` (fail-closed).
## Events