Developers · Quickstart
Keep your framework.
Change the route. Gain control.
Govern an existing agent without an SDK: two short YAML files, a new base URL, an OAuth token and a few headers. Your agent's logic and tools stay unchanged.
The workflow
Nine steps, most of them one line
- Step 01
Get your application service and OAuth client
Your platform team sets up your team's space in IntSen and an OAuth client (client id and secret) for your agent—or registers your team's identity provider.
- Step 02
Write the Registration
The use case: owners, maximum data class, the OAuth client, approved models and the capture policy.
- Step 03
Write the Agent
The agent: owners, description, which registration it belongs to, its client and per-turn limits.
- Step 04
Validate
Run intsenctl apply with --dry-run to see validation errors and exactly what would change.
- Step 05
Apply
Apply both files with intsenctl, or through your team's config repository pipeline.
- Step 06
Authenticate the agent
Get a token with the OAuth client-credentials flow and use it as the API key.
- Step 07
Change the base URL
Point your model client at the IntSen AI Gateway's OpenAI route.
- Step 08
Add the headers
Registration and agent once; a new task id for every user message; conversation and user ids if you have them.
- Step 09
Make a call and inspect it
Send a request, then open the agent in the Console to see the turn, its checks and its cost.
Interactive walkthrough
From YAML to a governed turn
Switch between the files. Every example uses reserved example domains; replace them with your own values.
# registration.yaml — your use caseapiVersion: gateway.ai.intsen.com/v1kind: Registrationmetadata: name: field-service-assistant-prod namespace: field-service # your application servicespec: description: Assistant for field technicians (manuals, parts, work orders) owners: - { email: product-owner@example.com } - { email: tech-lead@example.com } maxDataClass: confidential # public | internal | confidential | restricted clients: - { clientId: fleet-advisor-prod } # the OAuth client your agent signs in with models: - provider: openai ids: [ gpt-5.4-mini ] capture: { bodies: true, retentionDays: 90, redactPii: true }Field notes
- namespace
- Your application service—your team's space in IntSen.
- maxDataClass
- The most sensitive data this use case may send. Models must be cleared for it.
- clients
- The OAuth client your agent signs in with. Unbound clients are refused.
- models
- Approved provider and model ids. The first release supports OpenAI.
- capture
- Store bodies (needed for traces, evals and compliance), retention, PII redaction.
TypeScript
The same change in TypeScript
Set the base URL and default headers on the client; pass turn headers per request.
import OpenAI from "openai";import { ulid } from "ulid"; const client = new OpenAI({ baseURL: "https://gateway.intsen.example/openai/v1", apiKey: await getIntsenToken(), // OAuth client-credentials token defaultHeaders: { "x-intsen-registration-id": "field-service-assistant-prod", "x-intsen-agent-id": "field-service/fleet-service-advisor", },}); // One task id per user messageconst turnHeaders = { "x-intsen-task-id": ulid(), "x-intsen-conversation-id": conversationId };const response = await client.chat.completions.create( { model: "gpt-5.4-mini", messages, tools }, { headers: turnHeaders },);Error handling
Every refusal carries a code
Gateway errors use an OpenAI-compatible envelope with a stable code and a request id you can look up in the Console.
{ "error": { "message": "Model 'gpt-5.4' is not allowed for registration 'field-service-assistant-prod'.", "type": "intsen_gateway_error", "code": "model_not_allowed", "param": "model", "source": "gateway-authorization", "request_id": "01JB8Q4Z0X9W6Y3T2R1P0N5M4K" }}from openai import APIStatusError try: response = client.chat.completions.create( model="gpt-5.4-mini", messages=messages, extra_headers=turn_headers)except APIStatusError as err: code = (err.body or {}).get("error", {}).get("code") if code == "task_budget_exceeded": return "This request needs more steps than allowed. Please narrow it down." if code in ("model_not_allowed", "provider_not_allowed"): raise # configuration problem: check the Registration's models raiseWant a guided technical walkthrough?
We'll connect one of your agents with your team, live, and walk through the traces, checks and spend it produces.