tinyhumansai/openhuman · error · anyhow::Error

integrations_agent requires a `toolkit` argument — e.g. `gma

Error message

integrations_agent requires a `toolkit` argument — e.g. `gmail`, `notion`. See `composio list_connection` for the currently-connected toolkits.

What it means

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.

Source

Thrown at src/openhuman/agent/debug/mod.rs:116

/// Render and return the system prompt for a single agent via the
/// real [`Agent::from_config_for_agent`] construction path.
pub async fn dump_agent_prompt(options: DumpPromptOptions) -> Result<DumpedPrompt> {
    let config = load_dump_config(
        options.workspace_dir_override.clone(),
        options.model_override.clone(),
    )
    .await?;

    // Ensure the registry is populated — `from_config_for_agent`
    // errors for any non-orchestrator id when the global registry
    // hasn't been initialised.
    AgentDefinitionRegistry::init_global(&config.workspace_dir)
        .context("initialising AgentDefinitionRegistry for prompt dump")?;

    if options.agent_id == INTEGRATIONS_AGENT_ID {
        let toolkit = options.toolkit.as_deref().ok_or_else(|| {
            anyhow!(
                "integrations_agent requires a `toolkit` argument — e.g. \
                 `gmail`, `notion`. See `composio list_connection` for \
                 the currently-connected toolkits."
            )
        })?;
        render_integrations_agent(&config, toolkit).await
    } else {
        render_via_session(&config, &options.agent_id).await
    }
}

/// Dump every registered agent's system prompt in one shot.
///
/// The synthetic `fork` archetype is skipped (byte-stable replay, no
/// standalone prompt). `integrations_agent` is expanded into one dump
/// per currently-connected Composio toolkit — if the user has gmail +
/// notion connected, `dump_all_agent_prompts` returns an entry for
/// `integrations_agent@gmail` and another for `integrations_agent@notion`.

View on GitHub (pinned to a221052e0d)

Solutions

  1. Pass a toolkit: `... integrations_agent --toolkit gmail` (or notion, etc.).
  2. Run `composio list_connection` first to see which toolkits are currently connected and pick one of those.
  3. Use the dump-all path instead — it expands integrations_agent once per connected toolkit automatically.

Example fix

# before
openhuman <debug-cmd> prompts --agent integrations_agent
# after
openhuman <debug-cmd> prompts --agent integrations_agent --toolkit gmail
Defensive patterns

Strategy: validation

Validate before calling

if agent_id == INTEGRATIONS_AGENT_ID {
    let toolkit = toolkit
        .as_deref()
        .map(str::trim)
        .filter(|s| !s.is_empty())
        .ok_or_else(|| "integrations_agent dump requires --toolkit (see composio list_connection)"?;
    render_integrations_agent(&config, toolkit).await
}

Type guard

fn needs_toolkit_arg(agent_id: &str) -> bool {
    agent_id == "integrations_agent"
}

Prevention

When it happens

Trigger: 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).

Common situations: 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.

Related errors


AI-assisted analysis of tinyhumansai/openhuman@a221052e0d (2026-08-16). Data as JSON: /api/errors/583676b7a2438185. Report an issue: GitHub.