Skip to content

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

Commits on main

3087a70
fix(crypto): stop the crypto agent describing five tools it can never call\n\n`crypto_agent`'s prompt built its entire safety procedure on tool names that\nresolve to nothing. Hard rule 2 told it to "confirm the relevant balance with\n`wallet_balances`"; rule 3 that "a `wallet_execute_prepared` call MUST be\npreceded by a matching `wallet_prepare_*`"; rule 4 to confirm before calling\n`wallet_execute_prepared`. None of those three tools exists. `ToolScope::Named`\ndrops an unregistered name at spawn (`subagent_runner/tool_prep.rs`), so they\nnever reached the model — the agent was following a procedure whose central\ncall could not be made.\n\nThe five names are not fiction, which is why this is a retarget and not a\ndeletion. Each has a working backing function exposed as a `wallet.*` RPC\nmethod (`web3/wallet/schemas.rs:59-68`) — `balances`, `network_defaults`,\n`supported_assets`, `encode_erc20_transfer`, `execute_prepared`. They were\nnever given agent Tool wrappers. `crypto_agent/agent.toml` said so itself:\n"this list also describes the agent's *intended* tool surface as wallet +\nexchange tools land." The intent never landed; the prompt was written as though\nit had.\n\nThe agent does have a real execute path, and the safety rules now gate on it:\n`web3_swap_execute` / `web3_bridge_execute` / `web3_dapp_execute`, each\nconsuming the `quote_id` its matching quote call returned, with\n`confirmed: true` enforced in `web3/store.rs:158`. Plain transfers are\ndocumented as prepare-only — `wallet_prepare_transfer` returns a quote and\nnothing in the agent's surface executes it, so the prompt now says to hand off\nto the wallet UI rather than describing a broadcast it cannot perform.\n\nRule 4 is not weakened. It gains a line: `confirmed: true` is a machine gate,\nnot a substitute for asking, and setting it without having asked is what the\nrule forbids. Worth stating because that gate runs on\n`ask_user_clarification`, which only began working on the top-level chat path\nthis morning (#6213) — so confirm-before-execute has never actually run as\ndesigned.\n\nDeliberately NOT done: adding a `wallet_execute_prepared` Tool wrapper. It\nsigns and broadcasts. Exposing it to an agent is a money-path decision that\nbelongs in a change arguing for it, not in an allowlist entry. The toml now\nrecords the five RPC-only names and why they are absent.\n\nAlso removes the five from the `crypto` pack (20 -> 15 tools) and corrects its\nsummary, which still advertised "balances". `render_pack_filtered` skips an\nunresolvable name silently, so the rendered menu had been quietly short.\n\nNew guard: `every_packed_tool_name_resolves_to_a_registered_tool` fails if any\npack names a tool that is neither registered nor a delegate name. The `composio`\npack is exempt — its tools register only once the user is signed in to Composio\n(`integrations/composio/tools_part_03.rs:320-323`), runtime auth state a unit\ntest cannot satisfy, so their absence says nothing about whether the names are\nreal.\n\nVerified: 1904 passed / 0 failed across `tools::` + `agent::registry`.\nRevert-check: with the fix reverted and the guard kept, it fails naming exactly\nthe five — `["crypto::wallet_balances", "crypto::wallet_network_defaults",\n"crypto::wallet_supported_assets", "crypto::wallet_encode_erc20_transfer",\n"crypto::wallet_execute_prepared"]` — and nothing else.\n
M3gA-Mind committed 2 months ago
739764c
aaf7cc2
test(tools): add orchestrator tool tests
Steven Enamakel committed 2 months ago
802f78e
7267ad6
f4b5ad5
f91d6b7
72f4c2d
8f752c7
56ae076
5e543a7