One Local Daemon.
Built for Stateless Agent Loops.
Stateless agents (Hermes, Google ADK, LangChain, LangGraph, Aider, and custom Python loops) rebuild their prompt on every turn. ToolRecall places one stdlib-only local daemon between the agent loop, the filesystem, and the LLM API — hashing keys deterministically at Layer-0, stubbing unchanged re-reads, pruning clean context, and pooling storage in SQLite WAL.
keys.py + RFC 8785 JCS3-Tier Execution Layer: Tracing Stateless Agent Requests
Select a runtime flow below or click any subsystem block to inspect how requests move from stateless Python agents through the local daemon into persistent storage.
.pth Shimbuiltins.open() read-only at interpreter startup. Never intercepts subprocesses.claude -p / opencode run), and WAF hooks.toolrecall daemon):8569, stubs repeated large blocks, guards outbound secrets.cache.db)libsql or libsql-sync (Turso).knowledge.db (off by default for coding loops; enable via expose_docs_tools).Systems Architecture Schematic
End-to-end IPC, proxy, and storage topology for stateless Python agents and local daemon substrates.
Interactive 74-Module Import Graph
AST-extracted intra-package imports across all 140 modules in toolrecall v0.8.29. Click any module to inspect its imports, dependents, and transitive blast radius.
toolrecall · v0.8.29 · intra-package imports
Core Architectural Contracts
Where to find benchmarks and setup docs: performance data lives on Benchmarks; CLI flags, agent postures, and config keys live on Docs.
Layer-0 Deterministic Keys
All cache keys and content digests route through toolrecall/keys.py and RFC 8785 canonical JSON (jcs.py). Pure functions — no clock, no session IDs, no config state.
Zero-Trust Security & Egress Gate
Path allowlists, sensitive-file blocklists, and outbound secret scanning (egress.py) enforce fail-closed policy regardless of caller metadata. Never trusts agent_id for auth.
Single-Instance & Optional Network
run_daemon holds an atomic flock on /run/user/$UID/tc.sock. Opt-in team sharing (127.0.0.1:8570) uses HMAC-SHA256 challenge-response (network_auth.py) and optional TLS.
Specialized Daemon Modules (CI, MCP & Security)
Included in the same daemon, scoped to the specific teams that need them.
Headless CI / Eval Replay
For teams running claude -p or opencode run repeatedly on the same commit. Replays identical reruns at $0 (−45% / −72% cumulative after 2 / 4 runs on Claude Code; −45.5% over 3 runs on OpenCode). Saves 0% on one-off runs.
MCP Multiplexer (--multiplexer-only)
Pools multiple slow local stdio MCP servers across CLI sessions to cut boot latency and RAM. Adds ~1.4k schema tokens/turn; net-negative if you have no third-party stdio MCPs.
Local FTS5 Doc Index (docs_search)
Fast offline keyword lookup over local skills and CLAUDE.md (0.6 ms). For retrieval only — measured +20% to +24% higher cost when added to SWE-bench coding tasks.
Antigravity Hooks & Auditor
PreToolUse WAF gate (blocks .env / dangerous commands), disk-drift alerts, and toolrecall audit antigravity for local security and drift guards.
Drop into any Python agent loop.
Pick the integration that matches your runtime. Full CLI options are in the Reference Manual.
Option A — Python SDK / Shim
pipx install toolrecall
toolrecall setup --yes
# Or decorate custom tools directly:
from toolrecall.adapters import adk
@adk.cached_tool(ttl=300)
def inspect_repo(path: str) -> str:
...
Option B — Forward Proxy (Input Dedup)
export OPENAI_BASE_URL=http://localhost:8569/v1 # or for Anthropic-compatible loops: export ANTHROPIC_BASE_URL=http://localhost:8569 # Auto-starts the local daemon on first request.