Quickstart
Create an agent, then call it from your code.
1. Create an agent
- In the console, open Agents and add a model credential (your provider key).
- Create the agent: a name, a system prompt, the model. Its config becomes version 1 and the
prodendpoint points at it. - Try it on the agent's Test tab.
- Create an API token with the
agents:invokescope and set it asORKESTR_API_KEY.
Or from the CLI (the model credential still comes from the console):
pip install --upgrade orkestr-cli && orkestr login
orkestr agents credentials # your model keys (never shown)
orkestr agents create analyst --prompt-file prompt.md --memory
orkestr agents run analyst "Summarise this week's signups"Or from code, with a token that has agents:write:
from orkestr import Agent, ModelCredential
cred = ModelCredential.list()[0] # added once in the console
agent = Agent.create("analyst", {
"system_prompt": "You analyse product data and answer in short bullets.",
"model_credential_id": cred["id"],
"memory_enabled": True,
}, description="Weekly numbers") # config = version 1, served at prod2. Call it
pip install orkestrfrom orkestr import Agent # reads ORKESTR_API_KEY
agent = Agent.get("analyst") # name or agt_ id
result = agent.invoke("Summarise this week's signups")
print(result.status, result.output) # completed ...
# Continue the same conversation:
agent.invoke("Which day was busiest?", session_id=result.session_id)Pass end_user_id (endUserId in JavaScript) when you serve your own users: it scopes memory, usage and erasure per user. qualifier picks a version for a new session (an alias, v3 or latest).
3. Stream it
Events arrive as Server-Sent Events: run.accepted first (with run_id and session_id), then tool.call / tool.result, and finally run.completed, run.failed or run.paused (waiting for an approval). Every event has an id; reconnect to GET /v1/agents/runs/{run_id}/stream with Last-Event-ID to resume a dropped stream.
for event in agent.stream("Summarise this week's signups"):
if event.type == "tool.call":
print("->", event.data["name"])
elif event.type == "run.completed":
print(event.data["output"])Or let your coding assistant build it
Paste this into Claude Code, Codex, Cursor or any agent that runs shell commands. It installs the CLI, logs you in through the browser, and builds and tests the agent:
curl https://orkestr.eu/agents.md and build an orkestr agent that <does what, for whom>