ctx.step.ai makes a call a durable step. It runs
once, its result is recorded under the step id, and a retry after a crash returns the saved result
instead of paying for the model again. Approvals, spend caps, guardrails, and streaming are all
built on that same step record.
Keep your framework. Duraton goes underneath it: your code still decides what the agent does;
Duraton makes sure it finishes, stops it before it overspends or acts without a person, and keeps the
record. Wrap an existing model call with
step.ai.wrap and
nothing else changes.What each page answers
Your provider key stays with you
The model call happens in your runner, with your provider SDK and your key. Duraton records the call’s metadata (model, token counts, latency) and never receives your prompt, the response text, or your API key:apiKey is passed per call into the provider client and is never persisted by the SDK
or sent to Duraton. Omit it and the provider SDK reads its conventional env var
(ANTHROPIC_API_KEY).
This describes running your own code with the SDK. A no-code workflow has no runner of its own, so
it resolves a key you add once under Credentials - still never
persisted anywhere but that one encrypted record, and still resolved fresh for each call rather than
held in memory between them.
Where to start
AI quickstart
Add your first durable AI step, trigger it, and watch spend land in the console.
Agent kit
agent() and tool(): write an agent whose every turn and tool call is a durable step.step.ai reference
Every option and return shape for
generate, wrap, embed, and loop.AI coding tools
Point Claude, Cursor, or any MCP client at these docs and at your project.