🤖 🛡️ Agent Shield
A runtime firewall for every agent. Deploy a shield with each agent. Enforce permissions before actions execute, manage policies centrally, and retain an audit trail.
agent-shield run -- <command> starts any Agent Client Protocol agent — Claude Code, Codex, Gemini CLI, Goose, OpenCode, OpenHands, or one of your own — as its subprocess and stands as an ACP agent in front of it. Any ACP client sees one agent; in between, the Shield decides, confines and records: session/request_permission by the policy (do it answered without the client, ask me first forwarded with the same options, leave it to me refused in a sentence), the agent's tool calls classed and held to the limits, fs/* and terminal/* confined to the workspace, mcpServers cut to what the policy lends, every action written to the audit and exported over OTEL.
agent-shield serve is the same proxy as a server, over WebSocket and ACP Streamable HTTP, one harness per connection, for the clients that reach an agent at an address — editors, notebooks, messaging bridges, a mobile app — and for a Shield on your own infrastructure, registered with Datalayer for its policies and its observability.
The first five minutes
pip install "datalayer-agent-shield[claude-code]"
agent-shield setup # node, the vendor CLIs, the credentials by name; the pinned adapter into the Shield's own prefix
agent-shield run -- claude-agent-acp # Claude Code behind the Shield, on this directory, with the default policy
The first decision is seen in the terminal with the first tool call. agent-shield log shows the audit; agent-shield policy show the policy in force and where each line came from. Measured on 15 October 2026 from a clean prefix: setup 27 seconds, run to a session 1.5 seconds.
- Getting started — install,
setup,run, the first decision; registering with Datalayer. - Architecture — the policy, the three levels, the proxy, the audit; what is built and what is not.
- Policy reference — every field, generated from the schema.
- The register — every harness, its adapter and pin, its terms, generated from agentspecs.
- Serve and registration — WebSocket and Streamable HTTP, the token, the bridge, the policies from IAM and the trace.
- Works with — the clients tried, with versions and dates, and what each cannot show.
- The audit — the vocabulary of the rows, the redaction, the trace.
- Protocols — ACP on both faces, and what the Shield lends.
- Conformance — the report, and what it evidences.
- CLI — every command.
- API — the Python package and the TypeScript package.
On Datalayer, the same Shield stands beside every application a Maker ships, managed from the SaaS — read The Shield and its pages for the people who build and administer: organization rules, what it sees and records, conformance and the report, a Rule and a permission, your companies, your own infrastructure. Runnable examples — the proxy driven from Python, a coding agent on Datalayer's runtime, a rule on a running session, the audit read back, an orchestrator reading a diff over A2A — are in agent-runtimes' examples/shield.
Built: the proxy (run), the server (serve, connect), the policy engine with its three levels and its limits, the register, the audit and the OTEL export, registration with Datalayer (setup --register), the long tail of ACP agents registered listed, the conformance map and report with the Shield section, drawn in Datalayer's Validate tab, the TypeScript package (types, sentences, displays, the report renderer; on npm). Not built: a PAP call through a registered standalone Shield seen answered by a company (run --pap lends it); the Shield section's what changed since the last report comparing two kept reports in Validate; continuous conformance.