llm-agent-control-plane
Deterministic policy enforcement for LLM agents.
What it is
Policy enforcement for LLM agents: a reference monitor that decides every tool call with provenance and approval rules, no model on the decision path. Prompt injection defence evaluated on AgentDojo, with an 80-event AI security incident dataset.
An LLM agent reads its user's request, its tools' results and whatever untrusted content it fetches as one stream of text, so whoever controls that content can direct the authority the agent holds. This repository releases a policy enforcement point (PEP) that sits between the agent and its tools and decides every tool call with two deterministic rules, with no model on the decision path; the scripts, summaries and decision logs behind its evaluation on AgentDojo with five models and a model-free replay of all 949 reference trajectories; and a dataset of 80 publicly documented AI-security events coded under a written codebook. It is the artifact of the paper Provenance-Checked Tool Calls: A Model-Free Reference Monitor for LLM Agents (M. B. Ali, N. Ali, M. A. Iqbal and M. S. Saleem), accepted at ARCAI 2026 (Springer proceedings). It is for researchers and engineers who want a prompt injection defence for tool-using agents that can be unit-tested and replayed, and for anyone who needs a coded dataset of AI security incidents with a codebook.
The PEP is a drop-in replacement for AgentDojo's tool executor. Both rules in one sentence each:
- Provenance: a consequential action's designators (recipients, URLs, account numbers) and identifiers must be sourced from the principal's request or from typed fields of tool results, never solely from third-party free text.
- Approval: a consequential action is approved once if its key arguments match an action the principal's request entails.
Install
uv venv && uv pip install -r requirements.txt # or: make venv
make test # offline unit tests for the released matcher (tests/test_matcher.py)
make lint # ruff
make replay # one suite replayed through the PEP, checked against results/replay/preflight_v22.json (seconds)
make replay-full # all four suites, both attacks, four policy variants (about 13 minutes; output identical to the released file)
From the README; see the full README for every option.
Links
More in Security tooling
- agent-off-switch: Find every AI agent identity in Microsoft 365, AWS and GitHub, see what it can reach, and switch it off. Offline on saved exports.
- skill-scan-gate: CI gate for Claude Code skills and plugins, with SARIF output. GitHub Action and CLI.
- agent-threat-model: Threat modeling for AI agents: describe the system in YAML, get a STRIDE and OWASP Agentic threat model.
- agent-config-audit: Audit AI agent configuration files for security risks.
- agentic-semgrep-rules: Semgrep rules for AI agent code in Python, TypeScript and JavaScript.
- security-actions: GitHub Actions for AI agent and supply chain security checks.
- cc-hooks: Typed Python SDK and offline test runner for Claude Code hooks.
- cc-plugin-lock: Lock file for Claude Code plugins: pins plugins and skills to content hashes and verifies them before load.
- claude-perm-sim: Claude Code permission rule simulator: shows which rule decides a tool call and where a rule set is permissive.
- llms-txt-gen: Generate llms.txt for any docs site or repository.
- scp-guardrails: Build AWS service control policies from a short spec and lint them for lockouts and statements that deny nothing.
- spotlighting: Spotlighting for prompt injection defence in Python: mark untrusted text before it reaches a model.
Topics: agent-security, agentdojo, ai-safety, ai-security, llm-agents, llm-security, policy-enforcement, prompt-injection, reference-monitor, research-artifact