Agent frameworks¶
An agent makes dozens of model calls for one task, and nobody watches each one. Point its framework at the gateway and every call it makes, tool round trips and hand-offs included, is checked against your policies, charged to the right team and recorded under the agent in Request logs. Most frameworks need one or two settings changed; your agent code stays as it is.
Pick your framework¶
| Framework | Language | The setting(s) to change | Page |
|---|---|---|---|
| OpenAI Agents SDK | Python | A default OpenAI client with base_url and your key; Chat Completions for non-OpenAI models |
OpenAI Agents SDK |
| Claude Agent SDK | Python, TypeScript | ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN (or ANTHROPIC_API_KEY) |
Claude Agent SDK |
| Google ADK | Python | Gemini(base_url=…) or GOOGLE_GEMINI_BASE_URL, and GOOGLE_API_KEY |
Google ADK |
| LangChain | Python | base_url and api_key on ChatOpenAI, ChatAnthropic or ChatGoogleGenerativeAI |
LangChain |
| LangGraph | Python | None of its own: the LangChain chat model you hand it | LangGraph |
| CrewAI | Python | base_url, api_key and custom_openai=True on LLM |
CrewAI |
| AutoGen | Python | base_url, api_key and model_info on OpenAIChatCompletionClient (or AnthropicChatCompletionClient) |
AutoGen |
| Pydantic AI | Python | base_url and api_key on the model's provider (OpenAIProvider, AnthropicProvider, GoogleProvider) |
Pydantic AI |
| Semantic Kernel | C#, Python | .NET: endpoint and apiKey; Python: an AsyncOpenAI client with base_url and api_key, passed as async_client |
Semantic Kernel |
| Haystack | Python | api_base_url (or OPENAI_BASE_URL) and api_key on OpenAIChatGenerator |
Haystack |
| LlamaIndex | Python | api_base and api_key on OpenAILike or OpenAI (base_url on Anthropic) |
LlamaIndex |
| Mastra | TypeScript | url and apiKey on the model object, or baseURL and apiKey on an AI SDK provider |
Mastra |
The values are always the same two: the gateway's address and a Vidai key (it starts vk_). Connect your app, on
the Keys page and in System › Settings › Gateway, shows the address and the base URL for each kind of SDK.
For every agent framework¶
- One key per agent, per environment. Add the agent under Applications & agents › New agent and issue its key there (or later, from the agent's Keys section with Issue a key). Each key works in one environment, so an agent that runs in development and in production holds a key in each. Never share one key between agents: the key is how Vidai knows which agent made a call.
- Turn the framework's retries down. A fallback chain may already have tried another model before you see an error (connection errors, time-outs, 429 and 5xx), so a framework that retries on top multiplies the attempts. Keep its retries few and spaced out (one or two) where it lets you; each page says where the setting is. See Fallback and retries.
- Find the agent's calls. Calls made with an agent's keys show under that agent in Request logs (filter Agent, or Called by › agents), within seconds of being made; See its calls on the agent's page opens the same list. Each call shows the model asked for and the one that answered, what the guardrails did, how long it took and what it cost.
- Pick models by the names you approved. An agent calls the models named under Models in the Control room,
within the agent's own list. A model it may not call is refused with
model_not_allowed, never sent elsewhere. - Chat is translated; the rest is not. Chat Completions, Messages and Gemini's
generateContentreach models of every provider the gateway serves. A framework that uses another API (the Responses API, embeddings, a provider's hosted tools) reaches only that provider's own models. See Endpoints.