{"record":{"id":"583676b7a2438185","repo":"tinyhumansai/openhuman","slug":"integrations-agent-requires-a-toolkit-argument","errorCode":null,"errorMessage":"integrations_agent requires a `toolkit` argument — e.g. `gmail`, `notion`. See `composio list_connection` for the currently-connected toolkits.","messagePattern":"integrations_agent requires a `toolkit` argument — e\\.g\\. `gmail`, `notion`\\. See `composio list_connection` for the currently-connected toolkits\\.","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/openhuman/agent/debug/mod.rs","lineNumber":116,"sourceCode":"\n/// Render and return the system prompt for a single agent via the\n/// real [`Agent::from_config_for_agent`] construction path.\npub async fn dump_agent_prompt(options: DumpPromptOptions) -> Result<DumpedPrompt> {\n    let config = load_dump_config(\n        options.workspace_dir_override.clone(),\n        options.model_override.clone(),\n    )\n    .await?;\n\n    // Ensure the registry is populated — `from_config_for_agent`\n    // errors for any non-orchestrator id when the global registry\n    // hasn't been initialised.\n    AgentDefinitionRegistry::init_global(&config.workspace_dir)\n        .context(\"initialising AgentDefinitionRegistry for prompt dump\")?;\n\n    if options.agent_id == INTEGRATIONS_AGENT_ID {\n        let toolkit = options.toolkit.as_deref().ok_or_else(|| {\n            anyhow!(\n                \"integrations_agent requires a `toolkit` argument — e.g. \\\n                 `gmail`, `notion`. See `composio list_connection` for \\\n                 the currently-connected toolkits.\"\n            )\n        })?;\n        render_integrations_agent(&config, toolkit).await\n    } else {\n        render_via_session(&config, &options.agent_id).await\n    }\n}\n\n/// Dump every registered agent's system prompt in one shot.\n///\n/// The synthetic `fork` archetype is skipped (byte-stable replay, no\n/// standalone prompt). `integrations_agent` is expanded into one dump\n/// per currently-connected Composio toolkit — if the user has gmail +\n/// notion connected, `dump_all_agent_prompts` returns an entry for\n/// `integrations_agent@gmail` and another for `integrations_agent@notion`.","sourceCodeStart":98,"sourceCodeEnd":134,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/a221052e0df5b1f7598fceba7329fd1af95d6699/src/openhuman/agent/debug/mod.rs#L98-L134","documentation":"The agent prompt-dump path (src/openhuman/agent/debug/mod.rs:116) special-cases INTEGRATIONS_AGENT_ID: because that agent is per-toolkit (its prompt expands per connected Composio toolkit), dumping it requires a `toolkit` option. When options.toolkit is None, this error names the contract and points at `composio list_connection` for discovering connected toolkits.","triggerScenarios":"Running the debug prompt dump for `integrations_agent` without a `--toolkit`/toolkit option (e.g. `openhuman debug prompt integrations_agent` with no toolkit flag, or the RPC/debug entry point with toolkit unset).","commonSituations":"Developer dumps all prompts then re-dumps one by id and forgets integrations_agent is parameterized; the dump-all path handles this automatically via connected_toolkits_for, so hitting it means you took the single-agent path.","solutions":["Pass a toolkit: `... integrations_agent --toolkit gmail` (or notion, etc.).","Run `composio list_connection` first to see which toolkits are currently connected and pick one of those.","Use the dump-all path instead — it expands integrations_agent once per connected toolkit automatically."],"exampleFix":"# before\nopenhuman <debug-cmd> prompts --agent integrations_agent\n# after\nopenhuman <debug-cmd> prompts --agent integrations_agent --toolkit gmail","handlingStrategy":"validation","validationCode":"if agent_id == INTEGRATIONS_AGENT_ID {\n    let toolkit = toolkit\n        .as_deref()\n        .map(str::trim)\n        .filter(|s| !s.is_empty())\n        .ok_or_else(|| \"integrations_agent dump requires --toolkit (see composio list_connection)\"?;\n    render_integrations_agent(&config, toolkit).await\n}","typeGuard":"fn needs_toolkit_arg(agent_id: &str) -> bool {\n    agent_id == \"integrations_agent\"\n}","tryCatchPattern":null,"preventionTips":["Remember integrations_agent is per-toolkit — its dump is parameterized unlike other agents.","Prefer the dump-all path, which expands it once per connected toolkit automatically.","Query `composio list_connection` to enumerate valid toolkit values."],"tags":["rust","debug","agent-prompts","integrations","argument-validation"],"backgroundTag":null,"analyzedSha":"a221052e0df5b1f7598fceba7329fd1af95d6699","analyzedAt":"2026-08-16T12:47:06.542Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}