Source note
Show HN: A Firewall for AI agents with auditing
Summary
trajeckt is a runtime gateway for MCP-speaking AI agents that blocks unsafe multi-step tool sequences using a sealed pre-session commitment graph and data-flow tracking. It matters because per-tool authorization can allow a sensitive read followed by an external write, even when each call looks allowed alone.
Problem
- Agent security checks often decide on one call at a time, such as
(agent, tool, arguments), so they can miss violations created by call order and data movement. - A sensitive database read followed by summarization and an external email can leak data while each individual tool call passes a local policy check.
- The agent context is treated as untrusted, so enforcement state needs to sit outside the agent and fail closed when no approved plan exists.
Approach
- Before execution, trajeckt creates or accepts a sealed
CompiledGraph(Gτ) that declares allowed tools, order, data sinks, scopes, and budgets. The graph is sealed with an HMAC and installed for a session. - Each tool call is checked against the current reachable frontier of the sealed graph. Calls outside the graph, sessions without an installed graph, and mismatched session IDs are refused.
- The gateway tracks provenance and taint so sensitive data cannot flow into forbidden sinks, even through intermediate tools such as summarizers.
- When an operator opts out of committed mode, a heuristic safety floor blocks known patterns such as
ReadSensitive → ExternalWriteandShellExec → NetworkEgress. - The system exposes block reasons, stable
reason_codevalues, per-session decision history, and signed corpus events for audit.
Results
- The README claims deterministic enforcement in about
1.6 msper check, outside the agent's control. - In the included smoke test,
read_databaseis allowed,summarizeis allowed, andsend_email_externalis blocked with HTTP403when it completes an exfiltration path. - A session that reaches
tools/callwithout an installed commitment is blocked before evaluation withno_commitment_installed;require_commitment_before_toolsdefaults totruein the described gateway path. - The MCP gateway implements the Streamable HTTP transport non-streaming profile for protocol version
2025-11-25and advertises2025-11-25,2025-06-18, and2025-03-26. - The audit endpoint returns the last
100enforcement decisions per session, and/corpus/streamsends signed events over SSE withLast-Event-IDsupport. - Evaluation evidence is limited: the README reports one ClawTrojan end-to-end case,
cs_delay_002, with trusted-instruction false-positive guard coverage; suite-wide measurement across all20ClawTrojan trajectories is not done.