In short.
The OpenRouter Agent SDK is a code library for developers who want to build tool-using AI agents on OpenRouter without writing their own conversation loop. The overview page describes a TypeScript package, @openrouter/agent, built on the OpenRouter Client SDK (@openrouter/sdk). Its main function, callModel, loops between the model and your tools until a stop condition is met or the model stops requesting tools. The page also covers Zod-typed tool definitions, stop conditions (stepCountIs, hasToolCall, maxCost and more), conversation state tracking, streaming, per-turn changes to model, temperature or tools, and remote MCP server tools. It says the Python and Go ports are kept in sync automatically. The overview does not state a licence, pricing, package version, supported runtime versions or error-handling behaviour, so those remain unknown. Nothing was installed or run, so all behaviour described here comes from the documentation and was not observed.
Researched and written by an AI model and checked by a second AI model. How it works
The analysis covers the complete selected documentation page at [https://openrouter.ai/docs/agent-sdk/overview.md], as captured on 2026-11-14. Pages linked from it are excluded and were not read: Call Model, Tools, Stop Conditions, Streaming, MCP tools, DevTools, the migration guide, Client SDKs, the package registries and the Python and Go repositories. No licence, pricing, version information or source code was in scope, so those are reported as unknown. Nothing was installed, executed or tested; all behaviour described is the vendor's documented account, not observed behaviour.
The overview
What this resource is
The resource is OpenRouter's Agent SDK documentation overview, which describes the package @openrouter/agent. The page calls it the set of primitives needed to build agentic applications on OpenRouter: instead of hand-writing conversation loops, tool dispatch and state tracking, you define what the agent does and the SDK handles the rest.
It is built on top of OpenRouter's TypeScript Client SDK. According to the page, @openrouter/agent depends on @openrouter/sdk and installs it automatically, and the OpenRouter class in the agent package accepts the same client options. The page advises adding @openrouter/sdk to your own dependencies if you also want to call REST endpoints directly, so you control which version you get.
The same SDK is listed for three languages: TypeScript (@openrouter/agent on npm), Python (openrouter-agent-sdk on PyPI) and Go (go-agent, with its repository at [https://github.com/OpenRouterTeam/go-agent]). The page says the Python and Go packages are ports of the TypeScript package that are kept in sync automatically. The Python and Go repositories are only linked, not described, so their actual parity rests on the source's claim and was not checked.
Overall assessment
On the evidence available, this is a real, specific developer library with a clear scope: an agent layer built on top of OpenRouter's TypeScript Client SDK. The overview is concrete, with install commands, a runnable-looking example, named functions (callModel, tool, stepCountIs, hasToolCall, maxCost) and a comparison table against the Client SDKs.
This assessment only reflects what one overview page shows. The page does not state a licence, a version number, pricing, supported runtime versions, error and retry behaviour, how state is persisted, or any security guidance for tool execution. Nothing was executed, so the SDK's quality, reliability and correctness are not assessed. Treat it as a well-documented starting point that still needs hands-on evaluation before you depend on it.
Who it is for
The page targets developers who need agentic behaviour: multi-step reasoning where the model calls tools, reads the results and decides what to do next. It is aimed at people already comfortable with TypeScript (or Python or Go) and with API keys and tool schemas.
For simple request/response calls, the overview recommends the lighter-weight Client SDKs. Beginners who have not built with LLM APIs before will find the overview readable, but it assumes familiarity with tool calling, Zod schemas and the Model Context Protocol, and it does not teach them.
Capabilities
The page lists these capabilities. Multi-turn agent loops: callModel loops automatically until a stop condition is met. Tool definitions: you define tools with the tool() helper and the SDK executes them. Stop conditions: stepCountIs, hasToolCall, maxCost and, in the page's words, more. Conversation state: the SDK tracks messages, tool results and context across turns. Streaming: real-time token output within each agent step. Dynamic parameters: model, temperature or tools can change between turns based on context. MCP tools: a remote Model Context Protocol server's tools can be plugged into callModel.
Each tool has a name, a description, a Zod parameter schema (inputSchema) and an execute function. The page says the SDK handles serialization, validation and dispatch. In the example, the result object returned by callModel has a getText() method that yields the final text.
The page links to separate pages for the full callModel reference, tools, stop conditions, streaming, DevTools (telemetry capture and visualization for development) and a migration guide from @openrouter/sdk. Those linked pages were outside the selected scope, so how each capability works beyond this overview is unknown.
Using it
Requirements
Based on the page, you need a JavaScript or TypeScript project (or Python or Go for the ports) and an OpenRouter API key supplied to the OpenRouter constructor (the example reads process.env.OPENROUTER_API_KEY). The TypeScript example imports zod; whether it requires separate installation and what schema dependencies the Python and Go ports use are not established here.
The page lists install commands for npm, pnpm, yarn, bun and deno (deno add npm:@openrouter/agent), pip for Python and go get for Go. Minimum Node.js, Deno, Bun, Python or Go versions are not stated. The page also does not state any account, credit or billing requirement on the OpenRouter side.
How it works
The central entry point is callModel. The page describes four steps: send the input to the model; if the model returns tool calls, execute them automatically; append the tool results to the conversation; repeat until a stop condition is met or the model makes no more tool calls.
Tools are created with tool(). Each has a Zod schema describing the arguments the model should supply and an execute function whose return value is fed back to the model. The overview says the SDK executes these developer-supplied functions automatically, but it does not say where they run or whether they are isolated. The idea that they run inside your own application process is an inference from the example, not something the page states. Stop conditions are passed in a stopWhen array. The example configures stepCountIs(10) and maxCost(0.50) as stop conditions. The page does not explain how they count, what units the cost uses, how multiple conditions combine or how they are enforced, nor what happens to partial work when a condition is met.
The SDK is built on the OpenRouter Client SDK, so model calls go through OpenRouter's API. This page does not describe how state is stored, whether it can be saved and resumed, how tool errors and invalid arguments are handled, or how streaming interacts with tool execution.
Setup
As shown on the page, setup means installing the package and then creating a client. Install with one of: npm install @openrouter/agent, pnpm add @openrouter/agent, yarn add @openrouter/agent, bun add @openrouter/agent, or deno add npm:@openrouter/agent. For the ports: pip install openrouter-agent-sdk, or go get github.com/OpenRouterTeam/go-agent.
Then import OpenRouter and tool from @openrouter/agent, create new OpenRouter({ apiKey: process.env.OPENROUTER_API_KEY }), define your tools and call openrouter.callModel with a model, an input and a tools array. The page recommends also adding @openrouter/sdk to your own dependencies if you call REST endpoints directly.
The page does not cover how to obtain an API key, how to keep it out of source control or how to configure other client options. Nothing here confirms that the install commands succeed.
Worked example from the page
The page's quick example defines a weather tool with tool({ name: 'get_weather', description: 'Get the current weather for a location', inputSchema: z.object({ location: z.string().describe('City name') }), execute: async ({ location }) => ({ temperature: 72, condition: 'sunny', location }) }). The execute function returns hard-coded values, so it stands in for a real weather lookup.
It then calls openrouter.callModel({ model: '~anthropic/claude-sonnet-latest', input: 'What is the weather in San Francisco?', tools: [weatherTool] }) and awaits result.getText(). The page says the SDK sends the input, receives a tool call, executes get_weather, feeds the result back and returns the final response, all in one callModel invocation.
The model identifier starts with a tilde and contains the word latest. The page does not explain what the tilde means or how the alias is resolved, so how that identifier behaves over time is unknown. The example was not run, so the output described is the page's account, not an observed result.
Assessment & evidence
Limitations and unknowns
This analysis covers one overview page. It does not cover the callModel reference or the pages on tools, stop conditions, streaming, MCP, DevTools or migration. The SDK was not installed, built or run, and its behaviour, performance and reliability were not tested.
The page does not state: the licence, package version, release date, supported runtime versions, pricing, how stop conditions such as maxCost count and are enforced, how errors and retries are handled, whether conversation state can be saved or resumed, rate-limit behaviour, or how hallucinated or invalid tool arguments are treated. It also does not discuss safety around tool execution. It describes the SDK automatically executing developer-supplied execute functions but does not say where they run or whether they are isolated. If they run inside your application with its access and privileges (an inference, not a statement on the page), deciding what each tool can reach is up to you.
The page says the Python and Go ports are kept in sync automatically, but the rest of the documentation uses TypeScript examples. So the Python and Go API shapes, feature coverage and maturity are not shown here. Because the SDK works through OpenRouter, your agent depends on that service; the page does not discuss using other providers directly.
Why these conclusions
The identity, capability and mechanism statements come straight from the page's own descriptions: the feature list, the four-step callModel loop, the description of the tool() helper, the stop-condition example and the comparison table with the Client SDKs. Where the page names a feature without detail (for example the word more after the stop conditions, or DevTools), this analysis repeats the claim and marks the detail as unknown.
The cost, rights and requirements sections are mostly about what is missing. The page has no pricing, licence or version text, so those are reported as unknown rather than guessed. The point about where tools run and with what privileges is an inference. The overview describes the SDK automatically executing developer-supplied execute functions but does not say where they run or whether they are isolated, so the point is labelled as an inference.
Alternatives
The only alternative the page names is the OpenRouter Client SDKs (@openrouter/sdk and its equivalents in other languages), which it describes as a lean API client that mirrors the REST API with full type safety. With them you handle orchestration, conversation state and tool dispatch yourself. The page's comparison table says to choose the Agent SDK for built-in loops, tool execution and state management, and the Client SDKs for direct model calls.
The page does not compare the SDK with other agent frameworks or with calling a model provider's API directly, so how it compares with those is not assessed. If you are weighing options, the page's own trade-off is less code and managed state with the Agent SDK against more control with a client library.
Evidence base
The only evidence is the selected documentation page at [https://openrouter.ai/docs/agent-sdk/overview.md], captured on 2026-11-14. It is first-party documentation from OpenRouter, so it shows how the vendor describes the SDK and is not independent verification.
No source code, package metadata, changelog, licence file, issue tracker or test results were available. Claims such as the ports being kept in sync, automatic tool execution and loop termination are the vendor's statements, not observed behaviour. No code was executed.
Access & freshness
Costs
The page states no price for the SDK, for OpenRouter usage or for any model. It does not say whether the packages are free to install, and the cost of running agents through OpenRouter is unknown from this evidence.
The page does show that one agent request can involve several model calls, because the loop repeats while the model keeps calling tools. It also offers stop conditions named maxCost and stepCountIs, with example values of 0.50 and 10. How they are counted and enforced, and what unit maxCost uses, is not documented here. Any real budget needs checking against OpenRouter's own pricing, which is outside the selected scope.
Rights and licence
The page does not state a licence for @openrouter/agent, openrouter-agent-sdk or go-agent, and it contains no terms of use, so reuse, redistribution and commercial-use rights are unknown from this evidence. The page links to npm, PyPI, pkg.go.dev and GitHub repositories, which may publish licence information, but those pages were outside the selected scope and were not read.
The example supplies an API key to the OpenRouter client and describes sending input and tool results to the model. The overview does not establish credential forwarding, recipient-specific data handling, retention or privacy terms, so check OpenRouter's own terms before sending sensitive data.
Freshness
The page was captured on 2026-11-14. It shows no publication or update date and no SDK version number, so it is unknown how current it is or which package release it describes. It mentions a migration guide for moving agent imports from @openrouter/sdk to the standalone package, which suggests the package layout has changed before, but it does not say when. Check the npm, PyPI and Go package pages for current versions before relying on the examples.
Suggested next steps
If you are considering the SDK, read the linked callModel, tools, stop-conditions and streaming pages, and check the licence and current version on the npm page and the GitHub repositories before adopting it. Confirm whether zod must be installed separately.
If you try it, start in a sandbox with a low-cost model and small tools that cannot change anything important. Set explicit stopWhen conditions such as stepCountIs, and find out how maxCost is measured before relying on it to control spending. Review what each tool can access, because the SDK runs tools automatically when the model requests them. Check OpenRouter's pricing and data-handling terms before sending real data. These suggestions are drawn from the design the page describes; none of them was tried.
