Agent Shield
About the project
AgentShield is a runtime security firewall for AI agents. It sits between an AI agent and the tools it wants to use. Before any action goes ahead, AgentShield checks it and decides whether to allow it, warn, ask a human to approve it, or block it.
How it works
Gateway: An agent’s runtime sends each requested action (such as http_get, run_shell_command or send_email) to the AgentShield gateway. The gateway checks the action and stores the decision. Only an allowed action returns a mock result.
Agent registry: You register each agent with an ID, an environment, the tools it may use and the exact hostnames it may reach. Once any agent is registered, unknown agent IDs are rejected. You can pause and resume an agent to test these limits.
Detection: Deterministic detectors look for threats such as hidden prompt injection, attempts to reach confidential data and uploads to unapproved domains.
Policy and risk score: A policy engine applies the rules, and an explainable 0–100 risk score is calculated from named factors. The weights can be configured.
0–29: allow
30–59: allow with a warning
60–79: approval required
80–100: block
Mandatory policy blocks always override the score.
Human approval: Pending approvals are stored and reviewed through the approvals API, or in the demo frontend. The reviewer sees the exact risk reasons and redacted arguments. An approved action must be resubmitted with its approval ID, and the approval can only be used once.
Chat monitor: You can paste chat text to get redacted findings, a risk rating and a recommendation after the fact. A shared chat link is only recorded as metadata and marked not_evaluated, because no website is contacted.
Attack demo: Fixed, repeatable scenarios (safe-run and attack-run) replay a hospital cybersecurity research task. The task includes hidden prompt injection, an attempt to read a confidential patient report and an attempt to upload it to an unapproved domain. The final decision is always blocked, and nothing real runs.
Tech stack
Backend: Python, FastAPI, Uvicorn, Pydantic, SQLAlchemy and SQLite.
Frontend: React, TypeScript, Vite and Tailwind CSS. The dashboard has Agents and Monitor Chat screens.
Quality checks: Pytest, Ruff and the TypeScript/Vite build.
Security and scope
Outside local demo mode, the API needs an API key (AGENTSHIELD_API_KEY). It is sent in the X-AgentShield-API-Key header, and the dashboard keeps it in memory only. CORS uses an explicit allow-list.
This is an MVP in simulator mode. It checks actions and returns mock results only. It does not intercept independent agents or control real tools.
Source trust labels are supplied by the caller and are not authenticated.
The README says plainly that it is not production-ready and does not give perfect security. It recommends using it alongside other defences.
One-line version for a slide or submission form: “AgentShield is a runtime security firewall for AI agents that inspects every requested action, detects threats like prompt injection and data exfiltration, scores the risk with an explainable 0–100 model, and then allows, warns, asks for human approval or blocks. Every decision is audited.”
Built with
AI tools
Prize Categories Entered
- Submitted
Best Use of Gemma 4
- Submitted

Best Open-Source AI Project