Back to home

Documentation

Gateplex Docs

Everything you need to instrument your AI agents with Gateplex — observability, guardrails, and governance for production LLM workloads.

Overview

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.

Quick start

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.

Authentication

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

API reference

POST /api/public/intercepts

Logs a single agent event and runs guardrails against it.

Request fields

FieldTypeRequiredDescription
agent_idstringNoUUID of a registered agent in this project
event_typestringYesllm_call | tool_call | guardrail_trigger
inputstringNoThe prompt or input sent to the model
outputstringNoThe model or tool response
modelstringNoModel identifier (e.g. gpt-4o)
latency_msnumberNoRound-trip time in milliseconds
flaggedbooleanNoWhether your client flagged this event
metadataobjectNoFree-form key-value pairs

Example request

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" }
}

Example response

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

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.

Golden Rule (financial)

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.

PII Shield

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.

Event types

llm_call

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.

tool_call

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.

guardrail_trigger

Emitted when your own client-side check fires before sending to Gateplex. Useful for tracking rejections from local safety logic alongside server-side verdicts.

Verdicts

Every intercept resolves to one of three verdicts:

  • ALLOW — no guardrail matched. The event is logged and your agent should proceed.
  • BLOCK — a guardrail matched with blocking severity. Your agent should stop and either ask the user to rephrase or escalate to a human.
  • FLAG — a guardrail matched but only surfaced a warning. The event proceeds, but it's marked for review in the dashboard.

MCP integration

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.

Python SDK

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.