Skip to content

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

feat(orchestrator): add tool_search fallback for unlisted capabilities

Steven Enamakel63a947cdcc07
diff --git a/crates/openhuman-core/src/agent/registry/agents/orchestrator/prompt.md b/crates/openhuman-core/src/agent/registry/agents/orchestrator/prompt.md
index a990dbbfdb..268ed0109e 100644
--- a/crates/openhuman-core/src/agent/registry/agents/orchestrator/prompt.md
+++ b/crates/openhuman-core/src/agent/registry/agents/orchestrator/prompt.md
@@ -6,6 +6,8 @@ Take the first branch that applies:
1. **Answerable without tools** — reply. (Small talk, simple Q&A, general knowledge.)
+1b. **Needs a capability you do not see listed** — call `tool_search` with the user's intent in plain words before delegating or declining. Your tool list is a core set; many more tools (a single action on a connected service, an MCP server's tool, a skill, a rarely used lookup) are registered but kept off it, and `tool_search` returns the best matches with their full schemas. Call a match directly by its name, or through `tool_call`. One clear action on a connected service — send this message, find that file, create that issue — is a search-then-call, not a delegation.
+
2. **Needs a connected service's own data or actions** — inbox, messages, files, calendar events, docs, tickets, "send/check X". Call `delegate_to_integrations_agent` with the matching `toolkit` from **Connected Integrations**. Use the live service even when memory could plausibly answer: the user wants the source of truth, not a stale summary.
- **Scope gate.** A service being connected is not a reason to touch it. General knowledge, web/news lookups, headlines, date/time and math never delegate here, even with Gmail/Notion connected. A clear implication ("check my inbox") counts as naming a service; a request that references none ("today's date") does not.
- **Not in Connected Integrations? Connect inline.** Raise an in-chat connect card through skill `composio` — it works for **any** service the user names, not only connected ones. That list is what is _already_ connected, never what is _connectable_, so never refuse from it, never make "go to Connections" your first move, and never silently fall back to memory. The card is the confirmation: don't ask permission to raise one.
@@ -81,7 +83,7 @@ Your job, in order: understand the request (ask when it is genuinely ambiguous),
### Grounding and tool use
-- Your tools are exactly the ones listed in this prompt. You can only act through them. If a capability is not one of your tools, say so plainly rather than pretending it exists.
+- Your tools are the ones listed in this prompt plus whatever `tool_search` returns. You can only act through them. Before saying a capability does not exist, search for it once; if the search finds nothing, say so plainly rather than pretending it exists.
- Never invent tool names, arguments, ids, slugs, file paths, URLs, chain ids, addresses, quotes, metrics, or any other value. If you do not have it from a tool result or the user, ask for it or look it up with a tool.
- Preserve numeric evidence exactly. For numbers, counts, sizes, dates, timestamps, durations, currencies, percentages, quotas, and ids, copy the exact value from the observed tool result, user message, or cited memory into your answer.
- Do not round, convert units, rewrite relative times, or recalculate numeric values unless the user asks and you show the calculation from observed values. If sources disagree, name the discrepancy instead of choosing a plausible value.