Skip to content
Open source In progress

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.
Target architecture on Google Cloud: gateway, policy and decision engines, security workers and human approval

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

  1. 01AI agentproposed tool call
  2. 02GatewayFastAPI · validation
  3. 03Policy enginedeterministic rules
  4. 04Security checksprompt injection
  5. 05Audit logPostgreSQL
  6. 06Human approvalReact dashboard
  7. 07Decisionallow · block · hold
  8. 08Tool runssimulated email
Decision path: every tool call is checked before it runs, and held actions wait for a human.
  • 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.