Announcing Dome Managed Agents.

Try it now

Vercel AI SDK agents and Dome

Keep your TypeScript agent, and govern every call it makes. The AI SDK is TypeScript, and so is the change. Create its OpenAI provider with the Gateway as baseURL and load tools with its MCP client. generateText, streamText and your stop conditions stay as written. The server holds one Dome key and no provider keys.

Dome governs every tool and model callin Vercel AI SDK.

Your loop stays as it is

generateText, streamText, and stop conditions are unchanged, and only the provider and the tool set change.

Tools from the Gateway

The AI SDK's MCP client loads tools from the Gateway's endpoint. The agent sees only the tools it is granted.

Keys stay on the server

The app holds one Dome key and no provider credentials. Every call lands in the audit trail against the agent.

Vercel AI SDK on Domein two changes.

Point createOpenAI at the Gateway's /v1 endpoint and createMCPClient at its /mcp endpoint, leaving the agent loop untouched.
  1. Install the packages

    The AI SDK, its OpenAI provider and its MCP client.

    shell
    npm install ai @ai-sdk/openai @ai-sdk/mcp
  2. Load tools from the Gateway

    createMCPClient over HTTP returns the tools this agent is granted, ready to pass to generateText.

    typescript
    import { createMCPClient } from "@ai-sdk/mcp";
    const mcp = await createMCPClient({  transport: {    type: "http",    url: `${GATEWAY_URL}/mcp`,    headers: { Authorization: `Bearer ${DOME_AGENT_KEY}` },  },});const tools = await mcp.tools();
  3. Call models through the Broker

    Use the OpenAI provider on chat completions, set the Gateway as its base URL, and name a pool as the model.

    typescript
    import { createOpenAI } from "@ai-sdk/openai";
    const broker = createOpenAI({ baseURL: `${GATEWAY_URL}/v1`, apiKey: DOME_AGENT_KEY });const model = broker.chat("claude-opus-5-5");

One agent,end to end.

A server-side generateText loop points the OpenAI provider at the Broker and loads the Gateway's tools with createMCPClient, so keys never reach the browser.

researcher

Answer questions about the code

generateText steps through the GitHub tools until it has an answer. The Gateway decides each tool call, and the Broker routes each model call.

typescript
import { createOpenAI } from "@ai-sdk/openai";import { createMCPClient } from "@ai-sdk/mcp";import { generateText, isStepCount } from "ai";
// Model: a pool on the Broker, through the OpenAI-compatible endpointconst broker = createOpenAI({ baseURL: `${GATEWAY_URL}/v1`, apiKey: DOME_AGENT_KEY });
// Tools: whatever this agent is granted on the Gatewayconst mcp = await createMCPClient({  transport: {    type: "http",    url: `${GATEWAY_URL}/mcp`,    headers: { Authorization: `Bearer ${DOME_AGENT_KEY}` },  },});
try {  const { text } = await generateText({    model: broker.chat("claude-opus-5-5"),    tools: await mcp.tools(),    stopWhen: isStepCount(10),    system: "Answer questions about the code. Search before you answer.",    prompt: "Where is rate limiting handled?",  });  console.log(text);} finally {  await mcp.close();}

Bringing it alltogether.

Connecting Vercel AI SDK agents to tools, models, and identity in Dome completes a governed agent application.
Dome

Acting for

Agent

Vercel AI SDKRuntime

Control point

GatewayEvery call decided and audited
RulesGuardsQuotas

Common questionsabout Vercel AI SDK.

How do I use a custom base URL with the Vercel AI SDK?
Call createOpenAI with baseURL set to the Gateway's /v1 endpoint and the Dome key as apiKey. Use provider.chat with a pool name.
How do I connect the Vercel AI SDK to a remote MCP server?
Use createMCPClient from @ai-sdk/mcp with an http transport, the Gateway's /mcp URL, and the Dome key as a bearer token.
What does a refused call look like?
An APICallError with status 403. Dome decides at the Gateway, before any provider or tool sees the call.

More of whatDome works with.

Model

Claude Fable

Fable 5.1 from Anthropic and Amazon Bedrock in one failover pool, open to one group and capped by quota.
Provider

Anthropic

The Claude API behind the Model Broker: the key held in Dome, every call authorized, metered and audited.
MCP server

GitHub

The GitHub MCP server behind the Tool Gateway, with rules that decide each call on its owner and repository.
Identity

Okta

Okta tokens verified on every agent call, so rules and audit name the person each agent acted for.
Client

Claude Code

Claude Code on a Dome Gateway with per-developer sign-in, rules on every tool call, and audit by name.
Agent service

TinyFish

TinyFish's web agents behind the Tool Gateway, with rules that decide each run on the site it targets.

Talk with ourFDE team.

Or start free, and register your first agent in minutes. Connect it through a gateway, give it rules, and see every call it makes in one audit trail.

Talk with our FDE team

Our engineers design, build and run governed agents for the part of your business you want to change. You see what they deliver.

Agent frameworks and runtimes: govern agents without a rewrite

Build agents on the framework you already use. Dome governs their tool and model calls without a rewrite.

Every agent you run, under one system of control.