AgentGate.
A security checkpoint between an AI agent and its tools. AgentGate is a hosted Python/FastAPI prototype that validates agent tool requests against a small allowlist, checks selected patterns, enforces simple limits, and requires a one-use approval for a sensitive demonstration action.
What is it, really?
An agent with unrestricted tool access could request unexpected actions or leak sensitive text. This prototype puts predictable checks between a request and two fixed demonstration tools.
Picture an office reception desk. It checks who's allowed in, what they are asking to do, whether a manager's permission is required, and what sensitive details should be hidden. AgentGate is a small software version of that checkpoint.
The practical use case
An agent with unrestricted tool access could request unexpected actions or leak sensitive text. This prototype puts predictable checks between a request and two fixed demonstration tools.
Hosted demo API
Public source code, architecture documentation, tests and the labeled browser demo are linked below. The implementation boundaries are documented, not hidden.
Follow the architecture.
Select any stage below. The explanation shows what enters that part of the system, what it does and what comes out. This diagram explains real code architecture; it is not connected to the running backend.
Authenticate
The FastAPI endpoint checks the X-API-Key header against the server-side client credential. The approval and audit endpoints require a different administrator key.
The visual flow is an educational representation. For the exact code paths, open the source and engineering documentation.
What does it look like?
These simplified examples are drawn from the repository's documented behavior. They explain what to expect; they do not execute an API request from this page.
What you provide
POST /tools/call
X-API-Key: <server-issued client key>
{
"session": "demo",
"tool": "search_docs",
"arguments": {"query": "onboarding"}
}What the system determines
{
"decision": "allow",
"result": {
"matches": [{"title": "Operations handbook", "...": "..."}]
}
}
send_notification requires a request-bound one-use admin approval first.Illustrative, simplified shape; the real endpoint also returns sanitized arguments and a call count. The adapter uses fixed demonstration data—no email or notification is actually sent. Never put client or admin keys in frontend JavaScript.
Every component has a job.
Instead of a giant list of tools, these are the actual responsibilities each technology has in this project.
Receives authenticated tool calls and exposes health and documentation.
Validates request models and basic field constraints.
Binds one-use approval tokens to exact request data.
Handles simple policy patterns, redaction and process-local state.
Show the working parts.
✓ Implemented
- Client and administrator authentication are separated.
- Only two named demo tools are allowlisted.
- Approval tokens are request-bound, one-use and time-limited.
- Redacts selected email/key patterns in nested values and outputs.
- Hosted /health and /docs are publicly checkable; protected endpoints require credentials.
○ Not claimed
- The two adapters are simulated; send_notification does not send a real message.
- Pattern checks are not robust against obfuscated, multilingual or indirect prompt injection.
- Session counts, approvals and audits live in one server process and reset on restart.
- The caller selects the session string, so per-session caps are not robust tenant quotas.
- No general MCP proxy, production security certification or full denied-event audit.
Understand the trade-offs.
Does it actually send notifications?
No. The notification adapter returns a simulation flag and does not send a message.
Can I try the live endpoint without a key?
The health endpoint and Swagger documentation are public; protected tool operations correctly reject missing credentials.
Can it stop every prompt injection attack?
No. It implements a limited set of checks, not a complete agent security system.
Being clear about limitations is part of engineering: the project shows patterns and testable code, not a promise of production security, measured cost reduction or unconfigured model inference.
No jargon left behind.
- Allowlist
- A short list of tool names that the system permits.
- Approval token
- A short-lived permission tied to one exact tool request.
- Redaction
- Replacing selected sensitive text with safe placeholders.
- Audit metadata
- A record of what was allowed without copying raw arguments.