v0.8.29 Operational & CLI Manual · Python 3.11+ Stdlib Only

ToolRecall Reference Manual

Installation, CLI commands, deterministic CI replay, agent profiles, and multi-agent scaling. For the 3-tier execution flow, systems schematic, and 74-module import graph, see Architecture →

01 // Getting Started

Quick Start & Installation

ToolRecall requires Python 3.11+ with zero runtime dependencies (pure Python standard library). Install the local daemon in two commands, or use the standalone Hermes plugin.

Step 01 · Install & Auto-Configure
Install via pipx or uv

Installs the isolated daemon, verifies the local service, and auto-wires detected coding agents.

pipx install toolrecall && toolrecall setup
# or: uv tool install toolrecall && toolrecall setup
Step 02 · Telemetry & Verification
Open Live Savings TUI

Inspect wire-verified tokens saved, billed USD, and cache hit rates in real time.

toolrecall top
# or: toolrecall healthcheck
What toolrecall setup configures automatically: Writes ~/.config/toolrecall/toolrecall.toml, registers the systemd user service (or macOS LaunchAgent / Windows task), starts the daemon, and wires detected agents (Hermes, OpenCode, Antigravity, Claude Code, Cline, Cursor). Running Hermes standalone? You can also install the zero-daemon in-process plugin via hermes plugins install https://github.com/whiskybeer/toolrecall-light (Hermes Plugin guide →).
02 // Commands

CLI Reference (v0.8.29)

Control daemon lifecycle, inspect live savings, manage Python shims, and audit hook integrations.

Command Description Key Options / Flags
toolrecall setup Interactive installation. Configures daemon, autostart, and agent profiles. --yes (non-interactive auto-accept)
toolrecall daemon Starts the ToolRecall daemon in foreground or manages lifecycle. --status, --restart, --stop
toolrecall top Stdlib curses TUI showing wire-verified tokens saved, billed spend, access log, 7-day trend, and stale context files. --once (plain text), --interval 2, keys 1..5
toolrecall status Prints live cache hit rates, banked token savings, active sessions, and pooled MCP servers. --json, --compact
toolrecall healthcheck Verifies UDS socket (/run/user/$UID/tc.sock) and proxy (127.0.0.1:8569). Exit 0 = healthy, 1 = warn, 2 = err
toolrecall shim Installs or removes transparent .pth open/subprocess interception for Python agents. --install, --remove, --venv <path>
toolrecall mcp MCP stdio bridge for external agents (Claude Code, Cursor, Cline, OpenCode). --multiplexer-only (skips file stubs)
toolrecall audit antigravity Verifies Antigravity hook installation, WAF gate rules, and local drift alerts. Local security & drift checks
toolrecall stop Stops the daemon and cleanly reverts environment and base-URL overrides. Automatic safe revert of touched rc files
03 // CI & Eval Replay

Deterministic Replay Mode for CI

Testing AI agents in CI suffers from API cost and non-deterministic flakiness. Deterministic Replay Mode acts as VCR for agent tool calls and LLM inference.

Zero-Cost Offline Replay

Tool outputs and LLM completions serve in <0.2ms from local SQLite. CI suites run 100% offline with zero API keys and $0 billed spend.

RFC 8785 Canonical Matching

Tool arguments are canonicalized (sorted JSON keys, scrubbed timestamps and session IDs) so minor prompt shifts still match deterministically.

Git-Committable Fixtures

Recorded scenarios export to portable JSON fixtures that live in your repository next to your agent tests.

3-Step CI/CD Workflow

1 · Record Locally
toolrecall replay record auth-v1
hermes -z "Fix auth token test"
toolrecall replay stop
2 · Export to Git
toolrecall replay export auth-v1 > tests/fixtures/auth-v1.json
git add tests/fixtures/auth-v1.json
3 · Replay in GitHub Actions ($0 Cost)
- name: Run Deterministic Agent Replay
  run: |
    pipx install toolrecall && toolrecall setup --yes
    toolrecall replay import tests/fixtures/auth-v1.json
    toolrecall replay replay auth-v1
    hermes -z "Fix auth token test"
    toolrecall replay stop

Branching Fork Trees

Fork an agent trajectory at turn K to test alternative prompts or tools from that exact checkpoint without re-running the prefix:

toolrecall replay tree new eval-tree-1
toolrecall replay fork eval-tree-1 node-3 "prompt-variation-b"
toolrecall replay at eval-tree-1 node-3

Replay Subcommands

Command Description
toolrecall replay record <name> Starts recording all tool calls and proxy responses under scenario name.
toolrecall replay replay <name> Starts deterministic replay mode; matching calls served from SQLite in <0.2ms.
toolrecall replay stop Stops record or replay mode and returns daemon to normal live execution.
toolrecall replay status / list Shows active replay scenario and hit rate, or lists all saved scenarios.
toolrecall replay export / import Exports scenario JSON to stdout or imports a fixture file into SQLite.
toolrecall replay delete <name> Permanently deletes a scenario from local storage.
04 // Integrations

Agent Compatibility & Profiles

Stateless agents benefit from full context caching and clean-file eviction; stateful coding CLIs should use proxy replay and MCP pooling only (never redundant file stubs).

Profile Modes
Green Full Context Caching: Stateless loops; cuts typically 45–83%, up to −93% prompt tokens.
Violet Swarms & SDK: Warm handovers (−52% tokens), @cached_tool, FTS5 skills search.
Cyan Proxy Replay & Pooling: Headless CI replay ($0 reruns) and MCP RAM pooling.
Amber Evaluation: Under live benchmark testing; use multiplexer-only safely.
Agent Recommended Mode Config Path Behavior & Reason
Hermes Agent
Hermes Plugin →
Full Caching + Shim ~/.hermes/config.yaml Stateless loop. Sustains 50+ turn workflows with −51.6% billed cost on 60-bug Django endurance.
Google ADK / LangGraph Full Caching + Shim Python venv / .pth shim Stateless Python loops. Use @adk.cached_tool or transparent venv shim + Context Tracker.
Cline Full MCP Bridge ~/.config/cline/mcp_settings.json Stateless VS Code agent. Prunes repeated multi-file reads automatically via toolrecall setup.
Google Antigravity SDK + MCP Multiplex ~/.gemini/config/mcp_config.json −52% handover tokens in subagent teams; 1,423-page FTS5 skills search; PreToolUse WAF hooks.
Claude Code (CLI) Proxy Replay + Hooks ~/.claude.json / settings.json Interactive sessions save ~0%; headless CI (claude -p) reruns save −45% to −72% via :8569 proxy; 65ms drift hook. Keep native Read/Edit.
Claude Desktop MCP Multiplexer Only claude_desktop_config.json Pools backend MCP servers into 1 process (−70% RAM) + 0.6ms local FTS5 docs_search.
OpenCode Proxy Replay + Hooks ~/.opencode/opencode.jsonc Stateful coding CLI: interactive runs save ~0%; headless CI reruns save −45.5% over 3 runs via proxy replay.
Cursor & Windsurf Multiplexer Only ~/.cursor/mcp.json Manages context internally. setup writes --multiplexer-only to pool MCP servers without redundant stubs.
Codex CLI Evaluation In Progress OPENAI_BASE_URL + MCP Static tool multiplexing & :8569 forward proxy active; skip MCP file stubs.

Per-Agent Setup Recipes

Google Antigravity (IDE, CLI, & SDK) SDK + MCP Multiplex

toolrecall setup registers the MCP bridge in ~/.gemini/config/mcp_config.json (or workspace .agents/mcp_config.json) across Desktop IDE, CLI (agy), and SDK.

  • IDE & CLI: Pools stdio MCP servers (−70% RAM) and exposes 0.6ms FTS5 skills search via docs_search().
  • Subagent Warm Handovers: Saves −52% prompt tokens across Planner → Coder → Tester transitions.
  • Headless CI: Export TOOLRECALL_CANONICALIZE=antigravity with the forward proxy to replay eval runs at $0.
from toolrecall.adapters import antigravity

@antigravity.cached_tool(ttl=300)
async def query_external_api(endpoint: str) -> dict:
    return await fetch_data(endpoint)
Claude Code (CLI) vs. Claude Desktop (GUI) Proxy Replay + Multiplexer
Claude Code (Terminal CLI)
  • Proxy Replay (:8569): Honors ANTHROPIC_BASE_URL for $0 CI reruns on claude -p.
  • Drift Alerts: PostToolUse hook detects out-of-band file edits in 65ms.
  • Note: Interactive 1-off chat saves ~0% (native prefix cache); keep native Read/Edit tools.
Claude Desktop (GUI App)
  • MCP Multiplexer: Pools backend stdio MCPs into 1 daemon (−70% RAM).
  • Config: Add to claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/).
{
  "mcpServers": {
    "toolrecall": {
      "command": "toolrecall",
      "args": ["mcp", "--multiplexer-only"]
    }
  }
}
Codex CLI (Safe Multiplexer Setup) Multiplexer Only

Codex CLI manages its own file buffers natively. Do not route file reads through MCP; use multiplexer-only mode to pool static tools safely:

toolrecall mcp --multiplexer-only
05 // Multi-Agent Fleets

Multi-Agent Swarms & Fleet Scaling

Scaling from one agent to collaborative swarms (Planner → Coder → Tester) or concurrent fleets introduces two failure curves.

Scaling Law 1 · Context Scaling
Handover Token Shock

In unmanaged swarms, every transition copies accumulated history. When Subagent 2 re-inspects files read by Subagent 1, raw bytes duplicate into the prompt. Across N handovers, token consumption grows quadratically.

Scaling Law 2 · RAM Scaling
Workstation Process Explosion

Without multiplexing, running N concurrent agents each with M MCP servers spawns N × M Node.js/Python processes (4 agents × 5 MCPs = 20 processes, ~4–5 GB RAM).

Warm Handover Swarms (ADK, LangGraph, CrewAI)

  • −51.6% Billed Spend: $0.36 vs $0.75 USD on SWE-bench Lite tasks
  • −52.2% Prompt Tokens: 7.1M vs 14.8M (7.7M tokens eliminated)
  • 27.6% Faster Runtime: 163.0s vs 225.2s latency

Headless CI & Fleets (Claude Code / OpenCode)

  • −72.1% Cumulative Cost: Rerun calls replay from local stream cache
  • 49% Faster Execution: Instant local stream replay cuts latency in half
  • 70% RAM Reduction: 1 warm daemon pool vs N cold subprocesses

Reproduce the SWE-bench Lite Multi-Agent Benchmark

Runs a 3-agent team across 5 repositories (astropy, django, matplotlib, seaborn, flask; 300 live calls on deepseek/deepseek-v4-flash).

git clone https://github.com/whiskybeer/toolrecall.git && cd toolrecall
pip install -e .
export OPENROUTER_API_KEY="sk-or-v1-..."
python3 bench/run_swe_multiagent_team.py

Audit report: SWE_MULTIAGENT_TEAM_REPORT.md · Raw trace: swe_multiagent_team_results.jsonl

06 // Repository Specs

In-Depth Technical Manuals (GitHub)

Full design documents, threat models, and canonicalization specifications live in the repository.