- 475tools behind one authenticated endpoint
- 294,033of 294,362 code chunks covered by the computed graph
- 0failures with two thousand agents calling at once
AI coding agents forget everything between sessions, rediscover the same facts about a codebase every day, and explain call paths that do not exist with complete confidence. Once they are allowed to act on real services they also need credentials they must never see. I solved those three problems in one service. FAFOHive is the authenticated MCP server every agent in my estate connects to. Inside it, a memory capability provides durable session memory and code intelligence grounded in a computed graph. Around that, FAFOHive hosts governance and media tools and a governed gateway to commercial and in-house integrations. Its tools, a minority of them native and the rest hosted or rebuilt from provider APIs, sit under one trust model with three dispatch paths.
The idea
Retrieval should be engineered for evidence, and a model should only narrate what the evidence shows. Dependency tracing is a bounded database traversal with no model in it. The code explainer may describe only edges the graph has proven, and answers "coverage incomplete" when it cannot. See A code explainer that is not allowed to invent.
Agents should use real services without holding keys. Identity is derived from the authenticated caller, never from tool input. Credentials stay server-side. Every call is accounted so that a restart does not repeat a provider call. Vendor events route back to the team that caused them. See Agents with real tools and no keys.
What I built
Native knowledge tools: structure-aware code search over parsed, AST-chunked source; reference search over documents and crawled sites; observation search over past decisions and fixes; dependency tracing and path explanation over a tree-sitter code graph of a 19,000-file multi-language monorepo.
Session memory: a hook pipeline captures every tool call as an observation, extracts and embeds it, and re-injects relevant context into later sessions, with transcript compression for very long sessions. This layer is my Rust re-implementation of an open-source session-memory plugin (AGPL-3.0).
Hosted tools: governance tools whose handlers run inside my agent platform, and media tools for a GPU media studio.
The governed business-provider gateway: payments, email and customer relationships, and social publishing, each provider's API rebuilt as tools of my own under stable namespaces, with attribution stamped only where it is known to round-trip.
In-house social modules for X, Facebook and Reddit, each with its own rate and budget ownership, a ledger of everything created, signature-checked inbound events, a read-back after every change, and a signed event feed. Three integrations built in about two days against a written standard.
Embeddings come from a dense embedding model on a local inference server.
Three indexes, one surface
Code, observations and references are three indexes behind one retrieval surface, so an agent asks one service whether it is looking for a symbol, a past decision or a vendor document. The code index is built from real edges and the model reads the map; it never draws it. Before a change is made, a dependency trace classifies its blast radius as local, module, system or estate, and a change that crosses envelopes is escalated instead of attempted.
The service's behaviour under a fleet of two thousand concurrent agents is in Two thousand concurrent workers.
The judgment in it
No fallback from the graph to a free-form explanation.
A refusal beats a plausible guess, because the caveat is the first thing a reader stops seeing.
An operation the gateway has not yet classified still runs, unmodified and accounted. Blocking it would break agents on every catalog change; modifying it would risk corrupting a payload.
An attribution mutation on the email provider stayed disabled until I had confirmed which operations round-trip it, because attribution that might be silently dropped is worse than none.
The first version of the gateway put shared key files on agent seats. It worked. I replaced it with server-side credentials and removed it.
What it demonstrates
One surface that unifies retrieval, agent governance hosting and third-party commerce actions while keeping their trust models separate; code intelligence that puts deterministic evidence in front of models; and security-first integration architecture that removes the confused-deputy problem by design.
Stories
A code explainer that is not allowed to invent · Agents with real tools and no keys · Two thousand concurrent workers
Technologies
Rust · Model Context Protocol · tree-sitter · PostgreSQL with vector search · Redis · Hybrid lexical and dense retrieval with cross-encoder reranking · Dense embeddings on a local inference server · OAuth 2.0 and JWT · Webhook signature verification · Social platform APIs