Secure outbound API calls for autonomous agents.
Project details
Airlock serves as a critical firewall for autonomous AI agents, monitoring and intercepting outbound API calls. By evaluating actions against a dynamic threat rules engine, it ensures that sensitive information is never exfiltrated and unauthorized requests are blocked. All activities are logged in a secure, tamper-evident ledger, solidifying system integrity.
Airlock: Your Egress & API Action Firewall for Autonomous AI Agents
Airlock is a robust firewall solution designed to safeguard autonomous AI agents by intercepting every outbound API call. It assesses these actions against a comprehensive threat rules engine before they are executed. By doing so, Airlock prevents unauthorized actions such as sensitive data exfiltration, unintended access to internal endpoints, and irreversible DELETE requests. All blocked and quarantined actions are meticulously logged to a tamper-evident immutable ledger, ensuring accountability and transparency in agent operations.
Autonomous agents operate with remarkable speed, often making rapid decisions that may pose risks without proper oversight. Without the protective layer of Airlock, these agents could:
Airlock effectively addresses these vulnerabilities, ensuring that all actions are evaluated and authorized before being allowed to proceed.
The architecture of Airlock operates with a simple yet effective flow:
Agent Action Request
│
▼
┌───────────────────┐
│ Airlock Server │ POST /intercept
│ │
│ ┌─────────────┐ │
│ │ Rules Engine │ │ Scores: method, endpoint, payload, headers
│ └──────┬──────┘ │
│ │ │
│ ┌──────▼──────┐ │
│ │ Verdict │ │ ALLOW / QUARANTINE / BLOCK
│ └──────┬──────┘ │
│ │ │
│ ┌──────▼──────┐ │
│ │ Ledger │ │ Append-only, hash-chained, tamper-evident
│ └─────────────┘ │
└───────────────────┘
│
▼
200 ALLOW or 403 BLOCK
| Method | Route | Description |
|---|---|---|
POST | /intercept | Evaluate an action before it fires |
POST | /rollback | Trigger rollback on a previously allowed action |
GET | /ledger | Read the full immutable action log |
GET | /verify | Verify ledger integrity (hash chain check) |
GET | /health | Health check |
To intercept an action, the following curl command is used:
curl -X POST http://localhost:3000/intercept \
-H "Content-Type: application/json" \
-d '{\
"method": "POST",\
"endpoint": "https://api.example.com/submit",\
"payload": { "data": "clean payload" },\
"agent_id": "my-agent",\
"source": "relevance-ai"\
}'
A successful response might look like this:
{
"allowed": true,
"verdict": "ALLOW",
"score": 0,
"reasons": [],
"ledger_id": "uuid-here",
"timestamp": "2026-12-04T..."
}
In contrast, a blocked action would return:
{
"allowed": false,
"verdict": "BLOCK",
"score": 75,
"reasons": ["Blocked endpoint pattern: /localhost/", "Endpoint failed format validation"],
"ledger_id": "uuid-here",
"timestamp": "2026-12-04T..."
}
Every intercepted action is documented in ledger.jsonl, providing an append-only, hash-chained record that guarantees integrity. This log includes a unique ID, timestamp, previous entry hash, verdict, score, reasons, and action metadata. The integrity of this ledger can be easily verified through the /verify endpoint.
Airlock employs a scoring system that assesses actions based on various risk factors, with thresholds determining whether an action is allowed, quarantined, or blocked:
| Trigger | Score Added |
|---|---|
| Blocked HTTP method (DELETE) | +40 |
| Blocked endpoint (localhost, internal, AWS metadata) | +50 |
| Sensitive field in payload (api_key, secret, token, etc.) | +20 each |
| Sensitive field in headers | +15 each |
| Endpoint fails format validation | +25 |
Airlock is built using Node.js, requires zero dependencies, and employs a simple JSONL storage format for its ledger. This system is designed to seamlessly integrate into existing infrastructures, creating an active defense layer against potential threats posed by autonomous AI agents. For further information, visit the GitHub repository.
Connect with the developer, Ramon Cortez, to learn more about its implementation and how it fits into a holistic autonomous defense stack.
Comments
0Start the conversation
Share the first comment.