Problem
Calling an LLM from a flow currently requires a 3-step workaround:
file-write — save prompt to temp file
bash — pipe to claude --print with --tools and --allowed-tools flags
code — parse the envelope ({"type":"result","result":"..."}) and strip markdown fences
This pattern is repeated in nearly every AI-powered flow. It introduces:
- Fragile string parsing (envelope unwrapping, fence-stripping, preamble removal)
- Double flag requirement (
--tools + --allowed-tools) that's easy to forget
- Timeout management at the bash level instead of step level
- No structured error when the LLM call fails vs. when the shell command fails
Proposal
A native step type:
{
"id": "analyzeData",
"type": "llm",
"llm": {
"model": "claude-sonnet-4-6",
"prompt": "{{$.steps.buildPrompt.output.text}}",
"outputFormat": "json",
"tools": ["WebSearch", "WebFetch"],
"timeout": 120000
}
}
The runtime would handle:
- Envelope unwrapping automatically
- JSON parsing when
outputFormat: "json"
- Structured error on failure (distinguishable from a shell error)
$.steps.analyzeData.output returns the parsed result directly
Why this matters
LLM calls are the primary use case for AI agent flows. Making them a first-class step type would eliminate the most common source of boilerplate and parsing bugs across flow authors.
Problem
Calling an LLM from a flow currently requires a 3-step workaround:
file-write— save prompt to temp filebash— pipe toclaude --printwith--toolsand--allowed-toolsflagscode— parse the envelope ({"type":"result","result":"..."}) and strip markdown fencesThis pattern is repeated in nearly every AI-powered flow. It introduces:
--tools+--allowed-tools) that's easy to forgetProposal
A native step type:
{ "id": "analyzeData", "type": "llm", "llm": { "model": "claude-sonnet-4-6", "prompt": "{{$.steps.buildPrompt.output.text}}", "outputFormat": "json", "tools": ["WebSearch", "WebFetch"], "timeout": 120000 } }The runtime would handle:
outputFormat: "json"$.steps.analyzeData.outputreturns the parsed result directlyWhy this matters
LLM calls are the primary use case for AI agent flows. Making them a first-class step type would eliminate the most common source of boilerplate and parsing bugs across flow authors.