API
Python SDK 1.0
Run agents, stream steps and answer approvals from Python 3.10 and up. Async client included.
The Python SDK leaves beta. It covers everything the API does: start runs, stream their steps, answer approvals, and start replays.
from capstan import Capstan
capstan = Capstan(api_key=os.environ["CAPSTAN_KEY"])
run = capstan.agents.run("churn-digest", input={"week": "2026-W44"})
for step in run.steps():
print(step.status, step.text)
There's an AsyncCapstan client for asyncio, typed responses throughout, and retries with backoff on network errors. Install it with pip install capstan.