Learning resourcesReviewed · OpenRouter

OpenRouter Agent SDK: Usage for Agents

OpenRouter’s Usage for Agents is a guide for developers adding OpenRouter instructions to AI coding assistants, but its examples leave application setup and real tool behavior to the developer. It introduces the official openrouter-typescript-sdk skill, covering @openrouter/agent and @openrouter/sdk.

Researched 13 Nov 2026

In short.

OpenRouter’s Usage for Agents is an installation guide for developers using AI coding assistants with OpenRouter, but it does not establish whether the installed skill produces correct, working code. It documents Claude Code, Cursor and GitHub CLI installation routes for the official openrouter-typescript-sdk skill. The described coverage includes model calls, tools, streaming, conversation state and agent-loop controls. Two TypeScript examples illustrate basic patterns; the search tool returns placeholder results. Skill contents, SDK version requirements, prices and licence terms are not supplied. Installation and runtime behavior are not assessed.

Researched and written by an AI model and checked by a second AI model. How it works

Coverage is the complete supplied documentation page at https://openrouter.ai/docs/agent-sdk/usage-for-agents.md, including its documentation-index notice, installation instructions, assistant-support table, capability descriptions, TypeScript examples and repository reference. The documentation index and all linked pages, repository files and package sources are excluded. The index notice is not evidence that those additional pages were examined. No commands, installation steps or examples were executed; runtime behavior and assistant compatibility remain unverified.

The overview

Identity

Usage for Agents is an OpenRouter documentation page explaining how to add OpenRouter SDK guidance to an AI coding assistant. The guide is available at [https://openrouter.ai/docs/agent-sdk/usage-for-agents.md].

It identifies openrouter-typescript-sdk as an official skill in [https://github.com/OpenRouterTeam/skills]. The skill covers both the Agent SDK, @openrouter/agent, and the Client SDKs, @openrouter/sdk. The page itself is a guide; the linked skill files are not included in the available evidence.

Assessment

This is a useful starting point for developers who want their coding assistant to recognize OpenRouter’s documented APIs and patterns. It gives an exact skill identifier, installation routes and short examples.

Its practical limits are substantial for someone starting an application from scratch: it omits dependency installation, runtime configuration beyond an API-key reference, error handling and a complete application. The page provides no results demonstrating installation success or generated-code correctness.

Users

The guide is aimed at developers using an AI coding assistant to build with OpenRouter’s TypeScript SDKs. Beginners receive concrete installation steps and example requests; experienced developers receive names of the APIs and control features the skill is intended to cover.

The page lists Claude Code, Cursor, OpenCode, GitHub Copilot, Codex, Amp, Roo Code and Antigravity as supported assistants. These are documentation claims; compatibility with particular assistant versions and equivalent behavior across them are not established.

Capabilities

The described skill covers callModel, model calls with type safety, streaming, tool definitions using tool() and Zod schemas, and stop conditions including stepCountIs and maxCost.

It also describes guidance for conversation state across turns and changing models, temperature or tools between turns. Only basic model calls and tool definitions are illustrated; streaming, stop conditions and multi-turn behavior have no worked examples on this page.

Using it

Requirements

The page says the skill works with assistants supporting the Agent Skills standard. Its GitHub CLI installation route requires version 2.90.0 or newer.

The application examples import @openrouter/agent, and the tool example also imports zod. They read an API key from process.env.OPENROUTER_API_KEY. Required runtime versions, SDK versions, dependency-install commands and model-access conditions are not specified.

Mechanism

The skill supplies instructions that a coding assistant can use when helping write OpenRouter code. The page does not expose those instructions or explain how each assistant discovers and loads them.

In the application examples, OpenRouter is constructed with an API key, callModel receives a model identifier and input, and result.getText() retrieves the response text. A tool definition combines a name, description, Zod input schema and asynchronous execute function.

Setup

For Claude Code, the documented commands are /plugin marketplace add OpenRouterTeam/skills followed by /plugin install openrouter@openrouter.

For Cursor, the page directs users through Settings > Rules > Add Rule > Remote Rule (Github), using OpenRouterTeam/skills. The GitHub CLI route is gh skill install OpenRouterTeam/skills openrouter-typescript-sdk.

After installation, the page suggests asking the assistant to help set up an OpenRouter agent or add a tool. It does not provide an installation-verification procedure, update instructions or troubleshooting steps.

Example

The first TypeScript example imports OpenRouter from @openrouter/agent, reads OPENROUTER_API_KEY, sends Hello! to model ~anthropic/claude-sonnet-latest through callModel, and awaits result.getText().

The second example defines a search tool with a query string validated by Zod, then passes it in the tools array. Its execute function returns placeholder results containing an ellipsis; it does not implement web search. Neither example includes actual model output or an execution result.

Assessment & evidence

Limitations

The full skill instructions, package sources and linked documentation are absent. Their correctness, security properties and compatibility cannot be established from this guide.

Nothing was executed. Installation, API authentication, model access, tool execution, streaming and agent-loop termination remain unverified. The page also omits error handling, retry behavior and a complete working application.

Practical fit

The concrete API names and examples make the guide most useful when a developer already has a coding assistant and needs OpenRouter-specific implementation guidance. Naming callModel, tool() and stop-condition helpers gives developers specific concepts to request and inspect.

The stated feature coverage does not establish the quality of the assistant’s generated code. Decisions about production reliability or application architecture require evidence beyond this installation guide.

Alternatives

The documented choices are installation routes for the same skill: Claude Code’s plugin system, Cursor’s remote rules and GitHub CLI skill installation. The appropriate route depends on the developer’s existing assistant and environment.

The page does not compare competing skills, agent frameworks or other SDK guides. Relative capability, cost and reliability are therefore not assessed.

Evidence

The available evidence is the complete Usage for Agents page at [https://openrouter.ai/docs/agent-sdk/usage-for-agents.md], captured as selected-page.txt. It supports the installation instructions, stated compatibility, capability descriptions and example-code observations.

The linked repository, assistant documentation, Agent Skills specification and other OpenRouter documentation are not included. There are no independent compatibility results, benchmarks or execution receipts.

Access & freshness

Costs

The page states no price for the skill, coding-assistant access, OpenRouter requests or model usage. Total setup and ongoing costs are unknown.

It names maxCost as a stop-condition feature but supplies no units, configuration example or demonstrated spending-limit behavior.

Rights

The page links to the skill’s source repository and welcomes contributions and feedback, but supplies no licence text or explicit reuse permissions.

Commercial-use, modification and redistribution rights for the skill and SDK examples are unknown from this page. The repository link alone does not establish those permissions.

Freshness

The supplied page was captured on 2026-11-13 at 04:00:47.129 UTC. Its source revision is sha256:47349d2bb626a7704cd4c89b6d8279ff013ea20f4bfe8bb23f4cd2c4de0cefd6.

The page gives no publication date, update date or SDK version pin. Its example uses a model identifier ending in latest rather than a dated model version. Repository activity and compatibility with later releases are unknown.

Next steps

Choose the documented installation route for your assistant and confirm the GitHub CLI prerequisite if using gh skill install. Before adopting the skill, inspect its actual instructions and licence in the linked repository.

For application development, establish compatible package and runtime versions, configure the API key, and replace the placeholder search handler with a real implementation. Verify basic model access and any required streaming, conversation or stop-condition behavior before relying on generated code. Obtain current pricing separately; this page supplies none.

Evidence for this report

selected-page.txtselected · checked 2026-11-13