- Agent steps
- Runtimes
Agent steps
Runtimes
The runtime is the agent engine that runs an agent step. There are three.
A runtime decides how the agent works and which model it uses. The signature, the tools and the output checks are the same on all three, so you can change runtime without rewriting the step.
@ava.agent_step(ExtractInvoice, runtime=ava.runtimes.ClaudeAgent(model="claude-haiku-5-5"))
async def extract_invoice(text: str, *, agent: ava.Agent) -> Invoice: ...
| Runtime | How the agent works | Install |
|---|---|---|
PredictRLM (default) | Writes and runs Python in a sandbox | avalanche-ai[agents] |
ClaudeAgent | Claude, through the Claude Agent SDK | avalanche-ai[claude] |
OpenAIAgent | An OpenAI model, through the OpenAI Agents SDK | avalanche-ai[openai] |
One runtime for the whole workflow
@ava.workflow(agent_defaults={"runtime": ava.runtimes.PredictRLM(lm="openai/gpt-5.5")})
def process_invoice(): ...
A step’s own runtime= wins. When both are the same kind, the step only overrides the fields
it sets.
PredictRLM
The default. The agent solves the task by writing Python and running it in a sandbox, turn after turn, until it has the outputs. Good for data, documents and anything that benefits from code.
ava.runtimes.PredictRLM(
lm="openai/gpt-5.5", # the model that writes the code
sub_lm="openai/gpt-5.5", # the model the code calls for small predictions
max_iterations=30,
)
| Option | Default | Meaning |
|---|---|---|
lm | none | Main model, as provider/model. |
sub_lm | none | Model used by the agent’s predict calls. |
max_iterations | 30 | Most code-writing turns. |
max_llm_calls | 50 | Most model calls in one run of the step. |
skills | none | PredictRLM’s own skills, such as pdf, docx, spreadsheet. |
allowed_domains | none | Sites the sandbox may reach. |
Specific to PredictRLM: its trace shows the generated Python and its output for every turn.
ClaudeAgent
Runs Claude through the Claude Agent SDK. The agent uses your step’s tools, plus any Claude Code tools you allow.
ava.runtimes.ClaudeAgent(
model="claude-haiku-5-5",
max_turns=10,
builtin_tools=("Read", "Grep"),
)
| Option | Default | Meaning |
|---|---|---|
model | Claude’s own default | The Claude model. |
max_turns | no limit | Most model turns. |
builtin_tools | none | Claude Code tools the agent may use, such as "Read" or "Bash". |
permission_mode | "default" | Claude Code permission mode. |
max_budget_usd | no limit | Spending limit for one call. |
system_prompt_append | none | Text added after the signature’s instructions. |
narrate | True | The agent says what it is about to do before each tool call. |
Sign in with ANTHROPIC_API_KEY, or with a Claude subscription token in CLAUDE_CODE_OAUTH_TOKEN.
Specific to ClaudeAgent: a Workspace input becomes the agent’s working folder, and
skills are supported.
OpenAIAgent
Runs an OpenAI model through the OpenAI Agents SDK.
ava.runtimes.OpenAIAgent(
model="gpt-5.4-mini",
max_turns=6,
builtin_tools=("filesystem", "shell"),
)
| Option | Default | Meaning |
|---|---|---|
model | the SDK’s default | The OpenAI model. |
max_turns | the SDK’s limit | Most model responses. |
builtin_tools | none | "filesystem" and "shell": let the agent edit files and run commands in a sandbox. |
system_prompt_append | none | Text added after the signature’s instructions. |
narrate | True | The agent says what it is about to do before each tool call. |
tracing | False | Also send the SDK’s own trace to OpenAI. |
Sign in with OPENAI_API_KEY.
Specific to OpenAIAgent: input files are attached to the model’s message, and skills are supported.
In the UI
The runtime and its model appear on the step’s Agent definition tab, under Models and Runtime. See the screenshot on Agent steps.
