Documentation
Everything you need to instrument your AI agents with Gateplex — observability, guardrails, and governance for production LLM workloads.
Gateplex is an observability and guardrails layer for AI agents. It intercepts every LLM call, tool invocation, and guardrail event your agents emit, 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, BLOCK, or FLAG), and stores the event for later review in the dashboard.
Who it's for: teams shipping LLM-powered products who need to monitor agent behavior, prevent unsafe outputs, 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 YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"agent_id": "agent_abc123",
"event_type": "llm_call",
"input": "What is the capital of France?",
"output": "Paris",
"model": "gpt-4o",
"latency_ms": 312,
"flagged": false
}'Then open the live feed to see your event appear in real time.
All API requests authenticate with a Bearer token in the Authorization header. 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 key" to invalidate the old key and generate a new one. Rotation is immediate; update your environment variables before rotating in production.
Authorization: Bearer gpx_live_xxxxxxxxxxxxxxxxxxxx
Logs a single agent event and runs guardrails against it.
| Field | Type | Required | Description |
|---|---|---|---|
| agent_id | string | No | UUID of a registered agent in this project |
| event_type | string | Yes | llm_call | tool_call | guardrail_trigger |
| 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. gpt-4o) |
| 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 gpx_live_xxxxxxxxxxxxxxxxxxxx
Content-Type: application/json
{
"agent_id": "8d2c1f4a-...-...",
"event_type": "llm_call",
"input": "Summarize this contract",
"output": "This contract grants ...",
"model": "claude-3-5-sonnet",
"latency_ms": 842,
"metadata": { "user_id": "u_42", "session": "s_99" }
}HTTP/1.1 201 Created
Content-Type: application/json
{
"ok": true,
"intercept": {
"id": "01J9...",
"created_at": "2026-05-18T12:34:56.000Z",
"event_type": "llm_call",
"flagged": false
}
}Guardrails are rules that evaluate each intercept and return a verdict. They run server-side, so your agent gets a consistent policy decision regardless of which client or framework emitted the event.
Blocks outputs that recommend specific financial actions, quote unverified numbers, or make guarantees about returns. Designed for fintech and advisory agents that must avoid investment advice.
Detects and flags personally identifiable information — emails, phone numbers, SSNs, credit cards — in both inputs and outputs. Can be set to BLOCK or FLAG depending on your compliance posture.
Configure both from the Guardrails page. Each rule can be toggled, scoped to specific agents, and customized via its config JSON.
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.
Every intercept resolves to one of three verdicts:
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 wraps the REST API with type-safe helpers and async support.
pip install gateplex
from gateplex import Gateplex
gp = Gateplex(api_key="gpx_live_xxxxxxxxxxxxxxxxxxxx")
verdict = gp.intercept(
agent_id="agent_abc123",
event_type="llm_call",
input="What is the capital of France?",
output="Paris",
model="gpt-4o",
latency_ms=312,
)
if verdict.action == "BLOCK":
raise RuntimeError(verdict.reasoning)Source and full reference on GitHub.