Vibeleaderboard
Index / tool

OpenRouter Agent SDK for Python

github.com/openrouterteam/python-agent
Category
AI Agents
Rank
No. 1877Tools index

Previous survey · No. 1906 ·

Pricing
Open Source
Type
TOOL
Use case
Agent Building
GitHub
9 stars
Date

About

An async Python toolkit for OpenRouter agents, covering Responses API calls, tools, streaming and resumable runs. Its documentation describes a port of the public TypeScript SDK surface.

At a glance

OpenRouter Agent SDK for Python runs a model and tool loop over OpenRouter's Responses API. It is worth evaluating if you already use OpenRouter and need typed local tools, streamed results or a pause for approval within a Python service.

Good fit

An application where the model asks for a function, your Python process executes it, and the SDK sends the result back to continue the run. A state accessor lets your application persist pending calls and resume after approval. You choose where that state lives.

Consider something else when

For a single model request, the underlying OpenRouter Python client already exposes the API. A durable job queue or an isolated execution environment still requires infrastructure around the agent SDK.

Start here

Install the published openrouter-agent-sdk package in a Python 3.10 or newer environment. Import call_model and tool from openrouter_agent, configure an OpenRouter client with an API key, and register a harmless tool that returns a fixed value. Await result.get_text() and check that the answer uses the tool result. Add a state accessor before testing approval and resume.

Cost and requirements

PyPI listed version 0.8.0 under Apache 2.0 at review. The package depends on the OpenRouter Python client and Pydantic. Hosted inference uses your OpenRouter account and the selected model's rates and limits. A multi-turn run can make several requests. Treat the SDK's cost stop condition as a check on reported usage and set account or key limits separately when available.

Limits to know

The local tool context stays in the application, while prompts and tool outputs supplied to the model pass through OpenRouter. Check the selected provider's handling and your account settings before sending sensitive data. Review covered the package metadata, implementation and service docs. Installation, live inference, streaming and approval resume remain untested.

Suggest an improvement

Similar tools

Browse all tools →

Tags

openrouterpythonai-agentssdkllmstreaming

Tech Stack

Python

Editorially curated, with community endorsements as a secondary signal. Corrections welcome.