Quickstart

Connect an existing agent to Intent Gateway with one base URL.

Before you start

  • An ArmorIQ organization. See Getting started.
  • To enforce policy, the agent registered in ArmorIQ with an active policy. See Add an agent and Policies.
  • An agent that uses the OpenAI SDK or the Anthropic SDK.

1. Create a gateway key

In the dashboard, open Gateway and click Create gateway key. The key is shown once, inside the base URL.

The base URL contains the key. Anyone who has it can send traffic as your organization, so store it like any other API key and keep it out of source control.

2. Choose the agent

Under Agent policy, pick the agent whose policy should apply. The base URL gains /a/<agent-id>.

Pick No agent to record traffic without blocking anything. You can add the agent later by changing the URL.

3. Point your SDK at the gateway

Set the base URL your SDK already reads. Keep your provider key exactly as it is.

OPENAI_BASE_URL=https://gw.armoriq.ai/v1/t/<gateway-key>/a/<agent-id>
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://gw.armoriq.ai/v1/t/<gateway-key>/a/<agent-id>",
});
from openai import OpenAI

client = OpenAI(base_url="https://gw.armoriq.ai/v1/t/<gateway-key>/a/<agent-id>")
ANTHROPIC_BASE_URL=https://gw.armoriq.ai/v1/t/<gateway-key>/a/<agent-id>
import Anthropic from "@anthropic-ai/sdk";

const client = new Anthropic({
  baseURL: "https://gw.armoriq.ai/v1/t/<gateway-key>/a/<agent-id>",
});
from anthropic import Anthropic

client = Anthropic(base_url="https://gw.armoriq.ai/v1/t/<gateway-key>/a/<agent-id>")

For Gemini, use the OpenAI SDK with the same base URL, your Gemini key and a Gemini model name.

4. Send a request

Run your agent as usual. The Gateway page shows Gateway traffic seen as soon as the first request arrives, and the trace appears in Observability.

To see enforcement, ask your agent to do something its policy blocks. The blocked tool call is missing from the reply, and the reply ends with a note such as:

Tool call "record_payment" was blocked by policy: block:record_payment#0

Optional: name the person using the agent

By default, requests are attributed to the owner of the gateway key. To attribute them to the person using the agent, send their email in the X-User-Email header.

const client = new OpenAI({
  baseURL: "https://gw.armoriq.ai/v1/t/<gateway-key>/a/<agent-id>",
  defaultHeaders: { "X-User-Email": "dana@example.com" },
});

The gateway reads the header and does not forward it to the provider.

On this page