Turn agents into an API. Call an agent, not a model, with the official OpenAI, Claude or Gemini SDK. 把智能体变成 API。
https://openagentapi.pages.dev/ ↗// momentum
// why it's here
- Created 8 days ago and already shipping
- Health 69/100 with only 2 stars
// how to help
// readme
You call an agent, not a model: one with its own tools, skills, and permissions. One call is one task.
English · 简体中文
Live Walkthrough: Publish → Key → SDK Call
Thirty seconds
Skip the rewrite. Swap two lines in your existing OpenAI, Anthropic, or Gemini SDK client—point base_url at the gateway and put an agent ID in model—and your app calls a full agent that uses its own tools, remembers across turns, and stops when a sensitive action needs your sign-off.
from openai import OpenAI
client = OpenAI(
- base_url="https://api.openai.com/v1",
- api_key=OPENAI_API_KEY,
+ base_url="http://127.0.0.1:8787/v1", # your Open Agent API
+ api_key="sk-oaa-…", # an API key created in the console
)
resp = client.chat.completions.create(
- model="<some-model>",
+ model="agent/research", # the agent's call name
messages=[{"role": "user", "content": "Compare these three quotes on lead time and total price"}],
)
print(resp.choices[0].message.content)
The same in Node.js: