oneshot
oneshot is the simplest possible pattern: one LLM call, no tools, no loop.
The agent’s system prompt comes from the AGENT.md body. The input is passed directly as the user message. The LLM response is the output.
When to use it
Section titled “When to use it”- Text transformations (summarize, translate, reformat)
- Classification or labeling
- Generating short content (titles, descriptions, tags)
- Any task that needs a single focused LLM response
AGENT.md
Section titled “AGENT.md”---name: summarizerdescription: Summarizes text concisely.version: "1.0.0"pattern: oneshotcall: model: role: thinker---
You are a concise summarizer. Given any text, return a clear 2-3 sentence summary.Focus on the key insights. Do not pad the response.Scaffold
Section titled “Scaffold”tama add oneshot my-agentHow it works
Section titled “How it works”- Input is received as the user message
- System prompt is the
AGENT.mdbody - Single LLM call is made
- LLM response is returned with
key="result"
No start(), no finish(), no tools. The runtime handles everything.
Output
Section titled “Output”The output key is always "result". When used as a step inside an fsm, the FSM transitions unconditionally from oneshot agents (since they always produce the same key).
Step file variant
Section titled “Step file variant”When used as a step inside critic, reflexion, or other multi-step patterns, each step file can declare oneshot behavior implicitly — the step is a single LLM call with the step file’s body as the system prompt.
Configuration
Section titled “Configuration”call: model: role: thinker # use role-based model selection temperature: 0.0 # deterministic output max_tokens: 512 # short responseExample: essay title generator
Section titled “Example: essay title generator”---name: title-generatordescription: Generates a compelling title for an essay.version: "1.0.0"pattern: oneshotcall: model: role: writer temperature: 0.9---
Generate a single compelling, specific title for the following essay.Return only the title, no explanation, no quotes.Run:
tama run "Rust's borrow checker enforces memory safety at compile time..."Output:
The Compile-Time Memory Safety Guarantee: How Rust's Borrow Checker Changed Systems Programming