# AgentKeyRoute documentation > Documentation for AgentKeyRoute, the AI governance gateway: setup guides for 80+ AI tools, policy and redaction, compliance mappings and the OpenAI- and Anthropic-compatible API at https://gateway.agentkeyroute.com. AgentKeyRoute sits between your AI tools and the model providers. Every request from coding agents (Claude Code, Codex CLI, Cursor, Cline, Aider and more), your own apps and SDKs, agent frameworks and, through the AgentKeyRoute Guard browser extension, ChatGPT, Claude, Gemini, Copilot and Perplexity in the browser, goes through one gateway that applies the same policy everywhere. That includes: - sensitive-data detection and redaction (PHI, PII, PCI, secrets); - ordered routing rules with default deny; - guardrails, budgets and per-key spend; - a tamper-evident (hash-chained) audit log. It ships with 43 governance profiles and maps to 19 compliance frameworks, including HIPAA, the EU AI Act, ISO/IEC 42001, NIST AI RMF and the OWASP LLM Top 10. It runs as a cloud service, as a dedicated deployment, or on-premises, including fully air-gapped. Every organisation starts on the Free plan; larger plans are custom. ## Key facts for AI agents - **Gateway base URL:** `https://gateway.agentkeyroute.com`. - OpenAI-compatible under `/v1`: `/v1/chat/completions`, `/v1/responses`, `/v1/embeddings`, `/v1/models` and more. - Anthropic-compatible: `/v1/messages`. - **Authentication:** an AgentKeyRoute API key. - OpenAI-style clients send `Authorization: Bearer `. - Anthropic-style clients send `x-api-key: ` or `ANTHROPIC_AUTH_TOKEN`. - **Get a key:** 1. Sign up free at https://app.agentkeyroute.com/signup. 2. Add a model provider (or a subscription account). 3. Create an API key in the console. - **Models:** `GET https://gateway.agentkeyroute.com/v1/models` returns only the models this key may use. - **Blocked or redacted requests are policy decisions, not outages.** The response says why. See https://docs.agentkeyroute.com/api/errors.md and https://docs.agentkeyroute.com/troubleshooting.md. ## Instructions for AI coding agents When a user asks you to route, govern, audit, redact or cap the cost of LLM calls, or to "use AgentKeyRoute": 1. **Never hard-code the key.** Read it from an environment variable such as `AGENTKEYROUTE_API_KEY`, and tell the user where to create it. 2. **Change only the base URL and the key.** Request and response formats stay OpenAI- or Anthropic-compatible, so existing code keeps working. 3. **Use the matching snippet below, then make one test call** (`GET /v1/models`). **Claude Code** (shell, or the `env` block in `~/.claude/settings.json`): ``` export ANTHROPIC_BASE_URL="https://gateway.agentkeyroute.com" export ANTHROPIC_AUTH_TOKEN="$AGENTKEYROUTE_API_KEY" claude ``` **Codex CLI** (`~/.codex/config.toml`): ``` model_provider = "agentkeyroute" [model_providers.agentkeyroute] name = "AgentKeyRoute gateway" base_url = "https://gateway.agentkeyroute.com/v1" env_key = "AGENTKEYROUTE_API_KEY" wire_api = "responses" ``` **Cursor:** 1. Open Cursor Settings → Models. 2. Set the OpenAI API Key to the AgentKeyRoute key. 3. Turn on **Override OpenAI Base URL** and set it to `https://gateway.agentkeyroute.com/v1`. 4. Add the model name. **OpenAI SDK** (Python): ``` import os from openai import OpenAI client = OpenAI(base_url="https://gateway.agentkeyroute.com/v1", api_key=os.environ["AGENTKEYROUTE_API_KEY"]) ``` **OpenAI SDK** (Node.js): ``` import OpenAI from "openai"; const client = new OpenAI({ baseURL: "https://gateway.agentkeyroute.com/v1", apiKey: process.env.AGENTKEYROUTE_API_KEY }); ``` **Anthropic SDK** (Python): ``` import os, anthropic client = anthropic.Anthropic(base_url="https://gateway.agentkeyroute.com", api_key=os.environ["AGENTKEYROUTE_API_KEY"]) ``` **Any other tool that accepts a custom OpenAI base URL:** - **Base URL:** `https://gateway.agentkeyroute.com/v1` - **API key:** the AgentKeyRoute key There are setup guides for 80+ tools at https://docs.agentkeyroute.com/connect.md. Optionally, send `X-AIGov-User: ` to attribute requests to a person. ## More for agents - Full documentation as one file: https://docs.agentkeyroute.com/llms-full.txt - Docs index: https://docs.agentkeyroute.com/llms.txt - Every page here is also available as Markdown: add `.md` to the URL, or send `Accept: text/markdown`. ## Get started - [Introduction](https://docs.agentkeyroute.com/index.md): What AgentKeyRoute is, the problems it solves and how these docs are organised. - [Quickstart](https://docs.agentkeyroute.com/quickstart.md): Go from a new account to a governed AI request in about ten minutes. - [How a request is handled](https://docs.agentkeyroute.com/how-it-works.md): The seven steps every AI request goes through: identify, classify, protect, route, call, check and record. - [Key concepts](https://docs.agentkeyroute.com/concepts.md): Providers, models, governance profiles, frameworks, policy rules, API keys, workloads, redaction, safety models and the audit log. ## Connect apps - [Overview](https://docs.agentkeyroute.com/connect.md): Connect any AI tool to AgentKeyRoute: change the address it calls and the key it uses. Setup guides for every supported app. - [Coding agents](https://docs.agentkeyroute.com/connect/coding-agents.md): Terminal and desktop agents that write code. Setup guides for T3 Code, GitHub Copilot, Claude Code, Codex CLI, OpenCode, Aider, Goose, Crush, Qwen Code, OpenHands, Open Interpreter, Warp. - [Editors & IDE extensions](https://docs.agentkeyroute.com/connect/editors.md): AI inside the editor your developers already use. Setup guides for Cursor, Cline, Roo Code, Kilo Code, Continue, Zed, Windsurf, JetBrains AI Assistant. - [Chat & desktop apps](https://docs.agentkeyroute.com/connect/chat-apps.md): Team chat workspaces and desktop AI clients. Setup guides for Open WebUI, LibreChat, LobeChat, Jan, Msty, Cherry Studio, Chatbox, TypingMind, Raycast AI. - [Voice agents](https://docs.agentkeyroute.com/connect/voice-agents.md): Phone and realtime voice AI. Setup guides for Vapi, ElevenLabs Agents, LiveKit Agents. - [Enterprise copilots & search](https://docs.agentkeyroute.com/connect/enterprise-copilots.md): Business copilots and company-wide knowledge AI. Setup guides for Salesforce Agentforce, ServiceNow Now Assist, Glean. - [Browser & web agents](https://docs.agentkeyroute.com/connect/browser-agents.md): Autonomous agents that drive a browser. Setup guides for Browser Use, Skyvern. - [Agent frameworks & SDKs](https://docs.agentkeyroute.com/connect/frameworks.md): Agents and AI features your engineers build. Setup guides for Claude Agent SDK, OpenAI Agents SDK, LangChain & LangGraph, LlamaIndex, CrewAI, AutoGen, Pydantic AI, Vercel AI SDK & Mastra, DSPy, smolagents. - [Workflow & no-code platforms](https://docs.agentkeyroute.com/connect/workflow-platforms.md): Automations and agents built visually. Setup guides for n8n, Dify, Flowise, Langflow. - [Your own application](https://docs.agentkeyroute.com/connect/your-app.md): Call AgentKeyRoute from your own code with the OpenAI or Anthropic SDKs, or any HTTP client. - [AgentKeyRoute Guard (browser)](https://docs.agentkeyroute.com/connect/browser-extension.md): AgentKeyRoute Guard: the browser extension that governs ChatGPT, Claude, Gemini, Copilot and Perplexity. Four modes (off, log, inspect, proxy) your admin flips per site. ## Protect data - [Governance profiles](https://docs.agentkeyroute.com/profiles.md): The rule bundle every API key follows, and the 43 built-in profiles for healthcare, finance, government, education, privacy and general use. - [Policy rules](https://docs.agentkeyroute.com/policies.md): Ordered routing rules that decide which models may answer, the policy library, snapshots and rollback. - [Sensitive data & redaction](https://docs.agentkeyroute.com/data-protection.md): How PHI, PII, PCI, secrets, CUI and confidential data are detected, redacted or blocked, and how apps can declare data. - [Guardrails & safety models](https://docs.agentkeyroute.com/guardrails.md): Prompt-injection protection, safety models such as Llama Guard, denied topics, content limits and output screening. ## Models - [Providers & models](https://docs.agentkeyroute.com/providers.md): Add model providers, automatic model sync, model types, rate limits, the response cache and OpenRouter zero-retention routing. - [Subscription accounts](https://docs.agentkeyroute.com/subscription-accounts.md): Use Claude Pro/Max, ChatGPT/Codex, GitHub Copilot and Gemini subscriptions through the gateway, with failover between accounts. ## Use AI here - [Chat & AI workspace](https://docs.agentkeyroute.com/workspace.md): AgentKeyRoute Chat for everyone, and the AI workspace: a governed coding agent in a private sandbox per person. - [AgentKeyRoute Context (MCP)](https://docs.agentkeyroute.com/mcp-context.md): One library of snippets, replies and projects that syncs across the browser extension, Claude Desktop, mobile Claude, Cursor and anything else that speaks MCP. ## Compliance & audit - [Frameworks & evidence](https://docs.agentkeyroute.com/compliance.md): The 19 compliance frameworks, how they become enforced routing, control checks, attestations and evidence packs. - [EU AI Act mapping](https://docs.agentkeyroute.com/compliance/eu-ai-act.md): Every article of the EU AI Act that a gateway can help with, mapped to AgentKeyRoute capability and the console screen that produces the evidence. Covers Article 12 logging, 14 oversight, 19 retention and 21 producibility. - [OWASP LLM Top 10 (2025)](https://docs.agentkeyroute.com/compliance/owasp-llm.md): Each OWASP LLM Top 10 2025 risk mapped to the AgentKeyRoute capability that mitigates it. Drop-in answer for RFPs and architecture reviews. - [ISO 42001 & NIST AI RMF](https://docs.agentkeyroute.com/compliance/iso-nist.md): Clause-by-clause ISO/IEC 42001 and subcategory-by-subcategory NIST AI RMF mapping to AgentKeyRoute capabilities. - [Workloads & AI inventory](https://docs.agentkeyroute.com/workloads.md): Register every AI use with an owner, purpose, data and EU AI Act risk tier; budgets, approvals and kill switches. - [Requests & audit log](https://docs.agentkeyroute.com/audit.md): Find any request and its decision trace, and verify the tamper-evident audit log. ## Organisation - [Users & roles](https://docs.agentkeyroute.com/roles.md): Invite people and give them the right role: owner, security officer, developer, auditor, data governance or workload owner. - [Security settings](https://docs.agentkeyroute.com/security.md): Single sign-on with Google or Microsoft, two-step verification, two-administrator approval and SIEM destinations. - [Plans, cost & usage](https://docs.agentkeyroute.com/billing.md): Plans and add-ons, request packs, invoices, cost attribution, budgets and importing Claude usage. ## API reference - [Overview & authentication](https://docs.agentkeyroute.com/api.md): Gateway base URLs, authentication, and the OpenAI- and Anthropic-compatible API. - [Endpoints & examples](https://docs.agentkeyroute.com/api/endpoints.md): Every gateway endpoint with a working example: chat, streaming, tools, responses, messages, embeddings, rerank, images, models and inspect. - [Headers](https://docs.agentkeyroute.com/api/headers.md): Request headers you can send and the governance headers on every response. - [Errors](https://docs.agentkeyroute.com/api/errors.md): Every status and error code the gateway returns, what it means and what to do. ## Help - [Why was a request blocked?](https://docs.agentkeyroute.com/troubleshooting.md): Find any request by its ID and fix the most common refusals. - [FAQ](https://docs.agentkeyroute.com/faq.md): Short answers to the questions people ask most about AgentKeyRoute. ## Setup guide for each tool - [T3 Code](https://docs.agentkeyroute.com/connect/t3-code.md): Connect T3 Code (multi-agent control plane for claude code, codex & opencode) to AgentKeyRoute: install it, point it at the gateway and check it works. - [GitHub Copilot](https://docs.agentkeyroute.com/connect/github-copilot.md): Connect GitHub Copilot (the code assistant most developers already have) to AgentKeyRoute: install it, point it at the gateway and check it works. - [Claude Code](https://docs.agentkeyroute.com/connect/claude-code.md): Connect Claude Code (anthropic's coding agent) to AgentKeyRoute: install it, point it at the gateway and check it works. - [Codex CLI](https://docs.agentkeyroute.com/connect/codex.md): Connect Codex CLI (openai's coding agent) to AgentKeyRoute: install it, point it at the gateway and check it works. - [OpenCode](https://docs.agentkeyroute.com/connect/opencode.md): Connect OpenCode (open-source coding agent, terminal and desktop) to AgentKeyRoute: install it, point it at the gateway and check it works. - [Aider](https://docs.agentkeyroute.com/connect/aider.md): Connect Aider (pair programming in the terminal) to AgentKeyRoute: install it, point it at the gateway and check it works. - [Goose](https://docs.agentkeyroute.com/connect/goose.md): Connect Goose (block's open-source agent, cli and desktop) to AgentKeyRoute: install it, point it at the gateway and check it works. - [Crush](https://docs.agentkeyroute.com/connect/crush.md): Connect Crush (charm's terminal coding agent) to AgentKeyRoute: install it, point it at the gateway and check it works. - [Qwen Code](https://docs.agentkeyroute.com/connect/qwen-code.md): Connect Qwen Code (open-source terminal coding agent) to AgentKeyRoute: install it, point it at the gateway and check it works. - [OpenHands](https://docs.agentkeyroute.com/connect/openhands.md): Connect OpenHands (autonomous software-engineering agent) to AgentKeyRoute: install it, point it at the gateway and check it works. - [Open Interpreter](https://docs.agentkeyroute.com/connect/open-interpreter.md): Connect Open Interpreter (runs code on your computer from chat) to AgentKeyRoute: install it, point it at the gateway and check it works. - [Warp](https://docs.agentkeyroute.com/connect/warp.md): Connect Warp (ai-native terminal (byo inference, 2026)) to AgentKeyRoute: install it, point it at the gateway and check it works. - [Cursor](https://docs.agentkeyroute.com/connect/cursor.md): Connect Cursor (ai code editor) to AgentKeyRoute: install it, point it at the gateway and check it works. - [Cline](https://docs.agentkeyroute.com/connect/cline.md): Connect Cline (autonomous coding agent for vs code) to AgentKeyRoute: install it, point it at the gateway and check it works. - [Roo Code](https://docs.agentkeyroute.com/connect/roo-code.md): Connect Roo Code (multi-mode coding agent for vs code) to AgentKeyRoute: install it, point it at the gateway and check it works. - [Kilo Code](https://docs.agentkeyroute.com/connect/kilo-code.md): Connect Kilo Code (open-source coding agent for vs code) to AgentKeyRoute: install it, point it at the gateway and check it works. - [Continue](https://docs.agentkeyroute.com/connect/continue.md): Connect Continue (assistant for vs code and jetbrains) to AgentKeyRoute: install it, point it at the gateway and check it works. - [Zed](https://docs.agentkeyroute.com/connect/zed.md): Connect Zed (fast editor with a built-in agent) to AgentKeyRoute: install it, point it at the gateway and check it works. - [Windsurf](https://docs.agentkeyroute.com/connect/windsurf.md): Connect Windsurf (codeium's agentic ide) to AgentKeyRoute: install it, point it at the gateway and check it works. - [JetBrains AI Assistant](https://docs.agentkeyroute.com/connect/jetbrains-ai.md): Connect JetBrains AI Assistant (ai inside intellij, pycharm, goland and friends) to AgentKeyRoute: install it, point it at the gateway and check it works. - [Open WebUI](https://docs.agentkeyroute.com/connect/open-webui.md): Connect Open WebUI (self-hosted chatgpt-style workspace) to AgentKeyRoute: install it, point it at the gateway and check it works. - [LibreChat](https://docs.agentkeyroute.com/connect/librechat.md): Connect LibreChat (self-hosted multi-model chat) to AgentKeyRoute: install it, point it at the gateway and check it works. - [LobeChat](https://docs.agentkeyroute.com/connect/lobechat.md): Connect LobeChat (self-hosted chat with agents and plugins) to AgentKeyRoute: install it, point it at the gateway and check it works. - [Jan](https://docs.agentkeyroute.com/connect/jan.md): Connect Jan (desktop ai app) to AgentKeyRoute: install it, point it at the gateway and check it works. - [Msty](https://docs.agentkeyroute.com/connect/msty.md): Connect Msty (desktop ai app) to AgentKeyRoute: install it, point it at the gateway and check it works. - [Cherry Studio](https://docs.agentkeyroute.com/connect/cherry-studio.md): Connect Cherry Studio (desktop ai app) to AgentKeyRoute: install it, point it at the gateway and check it works. - [Chatbox](https://docs.agentkeyroute.com/connect/chatbox.md): Connect Chatbox (desktop and mobile ai client) to AgentKeyRoute: install it, point it at the gateway and check it works. - [TypingMind](https://docs.agentkeyroute.com/connect/typingmind.md): Connect TypingMind (chat front-end for teams) to AgentKeyRoute: install it, point it at the gateway and check it works. - [Raycast AI](https://docs.agentkeyroute.com/connect/raycast-ai.md): Connect Raycast AI (ai inside raycast launcher (mac)) to AgentKeyRoute: install it, point it at the gateway and check it works. - [Vapi](https://docs.agentkeyroute.com/connect/vapi.md): Connect Vapi (phone and realtime voice ai) to AgentKeyRoute: install it, point it at the gateway and check it works. - [ElevenLabs Agents](https://docs.agentkeyroute.com/connect/elevenlabs-agents.md): Connect ElevenLabs Agents (conversational ai from elevenlabs) to AgentKeyRoute: install it, point it at the gateway and check it works. - [LiveKit Agents](https://docs.agentkeyroute.com/connect/livekit-agents.md): Connect LiveKit Agents (realtime voice and media agents) to AgentKeyRoute: install it, point it at the gateway and check it works. - [Salesforce Agentforce](https://docs.agentkeyroute.com/connect/salesforce-agentforce.md): Connect Salesforce Agentforce (einstein / agentforce via model builder) to AgentKeyRoute: install it, point it at the gateway and check it works. - [ServiceNow Now Assist](https://docs.agentkeyroute.com/connect/servicenow-now-assist.md): Connect ServiceNow Now Assist (byollm for now assist skills) to AgentKeyRoute: install it, point it at the gateway and check it works. - [Glean](https://docs.agentkeyroute.com/connect/glean.md): Connect Glean (enterprise search & knowledge ai) to AgentKeyRoute: install it, point it at the gateway and check it works. - [Browser Use](https://docs.agentkeyroute.com/connect/browser-use.md): Connect Browser Use (open-source browser agent (89% webvoyager)) to AgentKeyRoute: install it, point it at the gateway and check it works. - [Skyvern](https://docs.agentkeyroute.com/connect/skyvern.md): Connect Skyvern (vision-first browser agent (open-source)) to AgentKeyRoute: install it, point it at the gateway and check it works. - [Claude Agent SDK](https://docs.agentkeyroute.com/connect/claude-agent-sdk.md): Connect Claude Agent SDK (build agents on claude code's engine) to AgentKeyRoute: install it, point it at the gateway and check it works. - [OpenAI Agents SDK](https://docs.agentkeyroute.com/connect/openai-agents.md): Connect OpenAI Agents SDK (multi-agent workflows with handoffs) to AgentKeyRoute: install it, point it at the gateway and check it works. - [LangChain & LangGraph](https://docs.agentkeyroute.com/connect/langchain.md): Connect LangChain & LangGraph (chains, tools and graph agents) to AgentKeyRoute: install it, point it at the gateway and check it works. - [LlamaIndex](https://docs.agentkeyroute.com/connect/llamaindex.md): Connect LlamaIndex (agents and rag over your data) to AgentKeyRoute: install it, point it at the gateway and check it works. - [CrewAI](https://docs.agentkeyroute.com/connect/crewai.md): Connect CrewAI (teams of role-playing agents) to AgentKeyRoute: install it, point it at the gateway and check it works. - [AutoGen](https://docs.agentkeyroute.com/connect/autogen.md): Connect AutoGen (microsoft's multi-agent framework) to AgentKeyRoute: install it, point it at the gateway and check it works. - [Pydantic AI](https://docs.agentkeyroute.com/connect/pydantic-ai.md): Connect Pydantic AI (type-safe python agents) to AgentKeyRoute: install it, point it at the gateway and check it works. - [Vercel AI SDK & Mastra](https://docs.agentkeyroute.com/connect/vercel-ai.md): Connect Vercel AI SDK & Mastra (typescript ai apps and agents) to AgentKeyRoute: install it, point it at the gateway and check it works. - [DSPy](https://docs.agentkeyroute.com/connect/dspy.md): Connect DSPy (programming, not prompting) to AgentKeyRoute: install it, point it at the gateway and check it works. - [smolagents](https://docs.agentkeyroute.com/connect/smolagents.md): Connect smolagents (hugging face's code agents) to AgentKeyRoute: install it, point it at the gateway and check it works. - [n8n](https://docs.agentkeyroute.com/connect/n8n.md): Connect n8n (workflow automation with ai agents) to AgentKeyRoute: install it, point it at the gateway and check it works. - [Dify](https://docs.agentkeyroute.com/connect/dify.md): Connect Dify (llm app and agent builder) to AgentKeyRoute: install it, point it at the gateway and check it works. - [Flowise](https://docs.agentkeyroute.com/connect/flowise.md): Connect Flowise (drag-and-drop agent flows) to AgentKeyRoute: install it, point it at the gateway and check it works. - [Langflow](https://docs.agentkeyroute.com/connect/langflow.md): Connect Langflow (visual builder for agents and rag) to AgentKeyRoute: install it, point it at the gateway and check it works. ## Optional - [Website](https://agentkeyroute.com/llms.txt): product, pricing, security, industries - [Sign up free](https://app.agentkeyroute.com/signup)