agent-custody
Gateway, policy engine, and Claude Code hook that checks AI agent actions before they run and signs verifiable receipts of each call.
At a Glance
About agent-custody
agent-custody, from Charioteer Consulting Ltd, is infrastructure for authorizing the actions of AI agents and keeping verifiable records of them. A gateway sits between agents and their tools, a Cedar or Rego policy decides each call before it runs, and every call, allowed or denied, produces a signed receipt that an auditor can verify offline with public keys. It is open source under Apache-2.0, with a Claude Code hook as the quickest way in.
What It Is
agent-custody is an authorization and audit layer for AI agents. A person signs a grant naming the agent, its tools, and how long it may act. The gateway checks each call against that grant and a policy, using facts it looks up itself, before forwarding to MCP servers, REST APIs, or other agents over A2A. Each decision is written as a signed receipt whose hash goes into a Merkle transparency log. A companion package provides governed memory, where each fact an agent comes to believe cites the receipt that produced it.
Claude Code hook
Running agent-custody init claude-code creates a key, a starter deny list, and hooks for the current directory. The hook starts in observe mode and blocks nothing. It signs a receipt for each shell command, file edit, and MCP tool call. agent-custody report verifies the receipts and lists calls the policy would have denied, such as a force push or terraform destroy. Removing one line from the config switches to enforce mode, so denied calls stop before they run. audit-sessions can also scan past Claude Code transcripts without writing anything.
Verification and limits
A reviewer needs only the agent's public key and the receipt files to check a receipt offline, and a browser verifier is provided. The documentation states limits plainly: the hook does not stop a credential already in the agent's environment, matching is on command text and is not a sandbox, tools such as Read, Grep, WebFetch and Task are not seen, and the signature shows a record was not altered, not that every call was seen. It says no independent witness runs yet and the hosted log is not anchored on mainnet yet. A gateway, credential custody, and egress lockdown are the documented ways to cover more.
Packages and deployment
The TypeScript package @agent-custody/receipts contains the gateway, SDK with framework adapters, verifier, and GitHub Action. A Python client on PyPI offers adapters for LangChain, the OpenAI Agents SDK, the Claude Agent SDK, CrewAI, Google ADK, and Hermes Agent. The gateway can run from source or as a container with Kubernetes and systemd options, and a hosted log is available.
Community Discussions
Be the first to start a conversation about agent-custody
Share your experience with agent-custody, ask questions, or help others learn from your insights.
Pricing
Open source (self-hosted)
Gateway, SDK, ledger and verifier are open source under Apache-2.0 and free to run yourself.
- Gateway, SDK, ledger and verifier
- Apache-2.0 license
Hosted log Free
Hosted log free tier with 10,000 appends a month.
- Your own tenant and log id on the hosted log
- As many API keys as you need
- Export everything, any time
- Community support on GitHub
Team
Hosted log with 1,000,000 appends a month.
- Everything in Free
- Email support, answered within two working days
- Billed monthly by card; cancel from the dashboard
- 1,000,000 appends a month
Enterprise
Dedicated log instance with your own signing key and region; priced by conversation.
- A dedicated log instance, your own signing key, your region
- API keys managed by your own operators
- A named contact and a stated response time
- A signed agreement and a data processing agreement
Capabilities
Key Features
- Gateway between agents and tools (MCP, REST, A2A)
- Cedar or Rego policy decisions before each call runs
- Signed grants naming agent, tools, and duration
- Signed receipts for every allowed or denied call
- Merkle transparency log
- Offline receipt verification with public keys
- Claude Code hook with observe and enforce modes
- Session audit of past Claude Code transcripts
- Governed memory tying beliefs to receipts
- Framework adapters and Python sidecar client
- GitHub Action to verify receipts on pull requests
- Container, Kubernetes, and systemd gateway deployment
