Ghost SDK: Why AI Agent Monitoring Shouldn't Cost You Latency
Ghost SDK is Tenet AI's fire-and-forget integration layer for AI agent decision monitoring. It uses an in-process background queue to capture full Reasoning Ledger records — context snapshot, reasoning chain, SHA-256 + Ed25519 signature — while adding less than 5ms to the agent's decision path. Your agent never waits. If the Tenet backend is unreachable, the agent runs unaffected.
The Observability Tax Problem
Standard observability SDKs use synchronous writes on the critical path, adding 50–200ms per event under normal conditions. Teams either accept the latency penalty, sample decisions (creating audit gaps), or disable monitoring entirely. Ghost SDK resolves this with a fire-and-forget architecture: the SDK call serializes the decision snapshot, queues it in memory, and returns in under 0.1ms. All I/O happens on a background thread.
What Ghost SDK Captures
Full context snapshot (agent in-memory state at decision time), reasoning chain (LLM response structure including chain-of-thought), input/output and tool calls, and SHA-256 + Ed25519 cryptographic signature. All components are CPU-bound memory operations. The cryptographic signing — which makes the Reasoning Ledger tamper-evident — takes 1–3ms on modern hardware and is the largest single component of the sub-5ms budget.
Sampling vs. Full Capture
Ghost SDK eliminates the performance reason to sample. With synchronous SDKs, sampling is a latency optimization. With Ghost SDK at sub-5ms blocking overhead, teams can capture every decision by default. Full capture is required for regulatory compliance audit trails and for reliable semantic drift detection — a 5% sample creates signal gaps that mask early drift patterns.