· via dev.to (home feed)
agentpolicy v0.1.0 ships Cedar-based policy decision point for AI agents on PyPI
agentpolicy v0.1.0 is now on PyPI as a local-first Cedar policy layer that can allow, deny, ask, rate-limit or redact agent actions; a field test validated live harnesses for Claude Code and Codex.

agentpolicy v0.1.0 has landed on PyPI under the package name agentsec-agentpolicy. According to a dev.to post by Debashish Ghosal documenting the release's field test, the tool is a policy decision point that runs locally and evaluates every action an AI agent attempts, returning one of five verdicts: allow, deny, ask, rate-limit or redact. Policies are written in Cedar, an open-source policy language, and the release ships with prebuilt rule packs. The project sits inside a broader agent-security effort called agentic-suite.
The field test behind the release
Before shipping, the author ran the policy layer against four agent CLIs: Claude Code, Cursor, Codex and Gemini. The discipline was strict: a tool only counted as supported if it ran through the actual harness and left evidence behind, including verdicts, assertions, transcripts, an audit trail and captured model traffic. Anything short of that stayed unproven. Two CLIs, Claude Code and Codex, ended with live, evidenced runs. The other two were investigated and deliberately left out of the supported set.
Claude Code: wiring a live harness
Getting Claude Code to a real pass took three fixes, per the dev.to report. First, the local test server had to speak Anthropic's wire format; a probe confirmed it could answer /v1/messages with a realistic response body. Second, the policy hook initially appeared to fire but wrote nothing to the audit log, and the fix was passing --settings explicitly, because settings files in the working directory do not load in headless runs the way the author expected. Third, since Claude Code runs as a separate Node process, an in-process HTTP hook could not observe its traffic, so a proxy was added to capture it.
Once the wiring was real, the live run passed on three counts: a read executed, a production-scoped write was escalated without creating its side-effect file, and a destructive command was denied, with all three decisions recorded in the audit trail. Six request and response pairs were captured.
Codex: a narrower but real pass
Codex needed its own investigation. The CLI no longer supports chat completions and expects the OpenAI Responses API, which the local test server happened to serve natively. Two practical traps surfaced along the way: codex exec waits forever in a harness if stdin is left open, and the provider base_url must carry a /v1 suffix or every call fails with a 404.
Headless Codex also lacks a pausable per-call approval hook comparable to Claude's. The test therefore proves a narrower claim: allow verdicts let commands execute, deny verdicts hold and trigger replanning, and pre-execution decisions match the in-process policy engine on parity checks. The run still ended with captured traffic, a parity audit trail, a blocked destructive command and an untouched target directory.
Why Gemini and Cursor stayed out
The exclusions are documented rather than glossed over. Gemini installed locally and its Gemma setup brought up a server, but the CLI's main loop could not run locally: the local Gemma route is classifier-only, and the CLI encounters an OAuth tier check before any model routing happens. Cursor, a GUI IDE, offered no supported headless surface for its permissions flow on the test machine, so no reproducible, evidence-producing path existed. These boundaries define exactly what v0.1.0 claims to support.
Why it matters
Agents that execute shell commands and write files need a control point between intent and effect. A local decision point returning allow, deny, ask, rate-limit or redact maps well onto real operational needs, including human escalation and data redaction rather than just binary gates, and Cedar gives the layer a declarative, auditable policy model instead of ad hoc checks scattered across hooks.
The methodology is equally notable. Shipping only what ran live with captured evidence, and publishing why the other two candidates were dropped, is rarer than it should be in agent tooling, and it makes the support claims checkable. Caveats remain: this is a v0.1.0, the field test is a single author's run on one machine (the author, who disclosed AI assistance in drafting the report, is transparent about that), and coverage spans two CLIs. The Gemini and Cursor dead ends also show how uneven headless testability still is across the agent ecosystem, a practical constraint for anyone building policy enforcement into this stack.
- #ai-agents
- #policy-engine
- #cedar
- #open-source
- #python
- #security