Documentation
Developer reference for Gateplex. Quickstart, Python SDK, MCP registry, and the REST API. Executive and compliance material lives on the product, enterprise, and compliance pages.
Gateplex is a governance firewall for autonomous AI agents. It evaluates the LLM calls, tool invocations and guardrail events that your agents or middleware send to it, giving you a real-time feed, audit trail and policy enforcement engine.
How it works: your agent (or middleware) sends an HTTP request to Gateplex for each event. Gateplex evaluates configured guardrails, returns a verdict (ALLOW, FLAG, BLOCK or PENDING_APPROVAL), and stores the event for later review in the dashboard. Gateplex returns the verdict. Your application is responsible for acting on it.
Who it's for: teams shipping LLM-powered products who need to monitor agent behavior, stop unsafe actions before they run, and meet compliance requirements without rebuilding observability from scratch.
Send your first intercept in under a minute:
curl -X POST https://gateplex.ai/api/public/intercepts \
-H "Authorization: Bearer gplx_xxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"agent_id": "3f2b8c1e-5a7d-4e19-9c3a-1b2d4f6a8e0c",
"event_type": "llm_call",
"input": "What is the capital of France?",
"output": "Paris",
"model": "your-model-id",
"latency_ms": 312,
"flagged": false
}'Then open the live feed to see your event appear in real time.
All API requests authenticate with Authorization: Bearer gplx_... or X-Gateplex-Api-Key: gplx_.... API keys are scoped per project - each project has its own key, so you can keep dev, staging, and prod separate.
Generate a key: visit the Projects page, select a project, and copy the key shown. New projects get a key automatically on creation.
Rotate a key: on the same page, click "Rotate" to invalidate the old key and generate a new one. Rotation is immediate; update your environment variables before rotating in production.
Authorization: Bearer gplx_xxxxxxxxxxxxxxxxxxxx
Alternatively, use:
X-Gateplex-Api-Key: gplx_xxxxxxxxxxxxxxxxxxxx
Logs a single agent event and runs guardrails against it.
| Parameter | Type | Required | Description |
|---|---|---|---|
| agent_id | string | No | Optional; must be the UUID of an agent in this project |
| event_type | string | Yes | llm_call, tool_call and guardrail_trigger are the standard values; any short text up to 64 characters is accepted |
| input | string | No | The prompt or input sent to the model |
| output | string | No | The model or tool response |
| model | string | No | Model identifier (e.g. your-model-id) |
| latency_ms | number | No | Round-trip time in milliseconds |
| flagged | boolean | No | Whether your client flagged this event |
| metadata | object | No | Free-form key-value pairs |
POST /api/public/intercepts
Authorization: Bearer gplx_xxxxxxxxxxxxxxxxxxxx
Content-Type: application/json
{
"agent_id": "3f2b8c1e-5a7d-4e19-9c3a-1b2d4f6a8e0c",
"event_type": "llm_call",
"input": "Summarize this contract",
"output": "This contract grants ...",
"model": "your-model-id",
"latency_ms": 842,
"metadata": { "user_id": "u_42", "session": "s_99" }
}HTTP/1.1 201 Created
Content-Type: application/json
{
"ok": true,
"intercept": {
"id": "c89aafe6-4c48-45bb-9ed1-1f26a6b17e50",
"created_at": "2026-05-18T12:34:56.000Z",
"event_type": "llm_call",
"flagged": false
},
"intercept_id": "cf180f42-618d-474a-a71b-64df25eb26bd",
"verdict": "ALLOW",
"flagged": false,
"reasoning": "No server-side guardrail matched. All checks passed.",
"requires_approval": false,
"triggered_rules": [],
"pii_types_detected": [],
"transaction_amount": null
}| Status | Meaning |
|---|---|
| 201 | Event logged; read the returned verdict before proceeding. |
| 400 | Invalid JSON or invalid request fields. |
| 401 | Missing, malformed or invalid API key. |
| 403 | Archived project (code: "project_archived"), or agent_id does not belong to this project. |
| 500 | Internal error. |
Poll this endpoint after PENDING_APPROVAL, using the same project API key and the top-level intercept_id returned by the POST response, not intercept.id.
GET /api/public/intercept/cf180f42-618d-474a-a71b-64df25eb26bd/status
Authorization: Bearer gplx_xxxxxxxxxxxxxxxxxxxx
HTTP/1.1 200 OK
Content-Type: application/json
{
"intercept_id": "cf180f42-618d-474a-a71b-64df25eb26bd",
"status": "PENDING",
"verdict": "PENDING_APPROVAL",
"reviewed_by_email": null,
"reviewed_at": null,
"reviewer_note": null
}APPROVED maps to ALLOW; REJECTED maps to BLOCK. Other statuses map to PENDING_APPROVAL.
Returns 404 if the intercept ID is not found for this project.
Guardrails are policies that evaluate each intercept and return a verdict (ALLOW, BLOCK, or FLAG). They are applied consistently to every event you send, independent of the client or framework that emitted it.
Gateplex supports ten rule types:
Three compliance packs are available that add multiple pre-configured rules at once: EU AI Act Article 12 Pack, HIPAA Safety Pack, and Financial Services Pack.
Configure guardrails from the Guardrails page. Each rule can be toggled and scoped to specific agents.
Any call to a language model. Use this for chat completions, embeddings, and streaming responses. The input field holds the prompt; output holds the model's response.
Any function or tool the agent invokes - database queries, web fetches, API calls. Put the tool name and arguments in input, and the result in output.
Emitted when your own client-side check fires before sending to Gateplex. Useful for tracking rejections from local safety logic alongside server-side verdicts.
Each intercept has one of four verdict states: ALLOW, FLAG, BLOCK, or PENDING_APPROVAL. A FLAG rule configured with requires_approval returns PENDING_APPROVAL, holding the action until a reviewer decides.
When a rule returns PENDING_APPROVAL, the action is held until a reviewer decides. Pass wait_for_approval=True to log_intercept to wait for the decision, or call client.wait_for_approval(intercept_id) yourself. A reviewer rejection raises GateplexRejectedError when you use wait_for_approval=True on log_intercept.
Gateplex ships a remote MCP server so agents built on Claude Desktop, Cursor, or any MCP-compatible client can call log_intercept, get_feed, and check_guardrails directly.
Install via Smithery with one command:
npx -y @smithery/cli install gateplex/gateplex --client claude
Or connect manually to https://gateplex.ai/mcp using the streamable HTTP transport. Browse the listing on Smithery.
The gateplex-python SDK (v0.2.4) wraps the REST API with typed helpers.
pip install gateplex-python==0.2.4
from gateplex import GateplexClient, GateplexBlockedError
client = GateplexClient(api_key="gplx_xxxxxxxxxxxxxxxxxxxx")
try:
response = client.log_intercept(
agent_id="3f2b8c1e-5a7d-4e19-9c3a-1b2d4f6a8e0c",
event_type="llm_call",
input="What is the capital of France?",
output="Paris",
model="your-model-id",
latency_ms=312,
)
except GateplexBlockedError as e:
# BLOCK raises GateplexBlockedError; stop the action here
print(e)
else:
print(response.verdict) # ALLOW | FLAG | PENDING_APPROVAL
print(response.reasoning)
print(response.triggered_rules)
print(response.pii_types_detected)
print(response.transaction_amount)
if response.is_flagged:
log_for_review(response)
if response.is_pending_approval:
handle_pending(response)log_intercept raises GateplexBlockedError when the verdict is BLOCK.
When a rule returns PENDING_APPROVAL, the action is held until a reviewer decides. Pass wait_for_approval=True to log_intercept to wait for the decision, or call client.wait_for_approval(intercept_id) yourself. A reviewer rejection raises GateplexRejectedError when you use wait_for_approval=True on log_intercept.
from gateplex import GateplexClient, GateplexRejectedError
try:
response = client.log_intercept(
agent_id="3f2b8c1e-5a7d-4e19-9c3a-1b2d4f6a8e0c",
event_type="tool_call",
input="Wire $24,000 to vendor ACME",
output="",
wait_for_approval=True,
poll_interval=5, # seconds
poll_timeout=300, # seconds
)
execute_action() # approved
except GateplexRejectedError as e:
cancel_action() # reviewer rejected
except TimeoutError:
cancel_action() # no decision in timeSource and full reference on GitHub.
Gateplex VPC Edition runs the governance engine inside your own AWS or Azure environment. In VPC and air-gapped deployments, evaluation is designed to run inside the customer's environment. Contact sales@gateplex.ai to request access.