AgentGuard
An open-source security gateway that checks every tool call an AI agent makes, then allows it, blocks it or holds it for a human to approve.
- Role
- AI/ML & Security · GDG McMaster
- Type
- Open source · AI agent security
- Stack
- Python
- FastAPI
- React
- TypeScript
- PostgreSQL
- Docker
- pytest
- Highlight
- I built the gateway's prompt-injection detector, with Unicode-normalized matching and evidence traced back to the original text.
The problem
AI agents now send emails, query databases and call APIs on their own. A single instruction hidden in an email or web page can turn a helpful agent against its user, and most agent setups run tool calls with no checkpoint in between.
What I built
AgentGuard sits between an agent and its tools. Each proposed tool call is checked against authorization policies, validated, and scanned for prompt injection and sensitive data, then allowed, blocked or held for human approval, with every decision audited. I'm on the AI/ML & Security team, where I own the prompt-injection detector.
How it's built
- 01AI agentproposed tool call
- 02GatewayFastAPI · validation
- 03Policy enginedeterministic rules
- 04Security checksprompt injection
- 05Audit logPostgreSQL
- 06Human approvalReact dashboard
- 07Decisionallow · block · hold
- 08Tool runssimulated email
- A FastAPI gateway intercepts every tool call an agent makes and runs it through a policy engine: allow, block or send for human approval.
- My prompt-injection detector catches hidden instructions in untrusted content, like emails, and is hardened against disguised characters and formatting tricks.
- A React dashboard lets reviewers see agent activity and approve or deny held actions.
- An open security benchmark and 150+ backend tests run in CI on every change.
Decisions
Detectors inform, policy decides
Security checks feed findings to the decision engine instead of acting alone, so no single heuristic can override a policy.
Human in the loop
High-risk actions pause for a person to approve, so agents stay useful without being given unchecked power.
What happened
- Prompt-injection detector merged into the backend and passing all regression scenarios.
- Policy engine, request validation and approval dashboard working, backed by 150+ backend tests in CI.