react
react is the fundamental execution unit in tama. It’s a loop: call LLM → execute tools → call LLM → … → finish(key, value).
The loop is driven by the model’s tool calls. It terminates when the model calls finish.
When to use it
Section titled “When to use it”- Tasks requiring external tools (web search, file access, code execution)
- Multi-step reasoning where the model needs to check intermediate results
- Tasks where the number of steps isn’t known in advance
- Any situation that needs more than a single LLM call
AGENT.md
Section titled “AGENT.md”---name: researcherdescription: Researches topics using web search.version: "1.0.0"pattern: reactcall: model: role: thinker uses: - search-web - fetch-url---
You are a research assistant with access to web search.
When given a research task:1. Search for relevant information using search-web2. Fetch full content from the most relevant URLs3. Synthesize findings into a comprehensive answer
Call finish with key="done" and your complete findings as the value.Scaffold
Section titled “Scaffold”tama add react my-agentHow it works
Section titled “How it works”start() → input ↓[LLM call with system prompt + skill descriptions] ↓model calls tools (read_skill, search-web, finish, ...) ↓tool results returned to model ↓[repeat until model calls finish()] ↓finish(key, value) → outputThe three universal tools
Section titled “The three universal tools”Every react agent always has access to:
| Tool | Signature | Purpose |
|---|---|---|
start | start() → string | Get the assigned input |
finish | finish(key: string, value: string) | Complete and pass output |
read_skill | read_skill(name: string) → string | Load a skill’s full instructions |
Additional tools come from skills loaded via read_skill.
Skills and progressive disclosure
Section titled “Skills and progressive disclosure”Skills are declared in uses: and their descriptions are injected into the system prompt at startup. The full instructions are only loaded when the agent calls read_skill("skill-name").
call: uses: - search-web # description visible at startup - fetch-url # full instructions loaded on demandThe finish key
Section titled “The finish key”The key in finish(key, value) is a routing word. In a standalone react agent it’s ignored. Inside an fsm, it determines which state comes next.
Convention: use "done" for success, "error" for failures, descriptive words for routing ("approved", "rejected", "needs-revision").
max_iter
Section titled “max_iter”The loop runs for at most max_iter iterations (default: 10). Override in frontmatter:
max_iter: 20Example: research agent
Section titled “Example: research agent”---name: deep-researcherdescription: Deep research agent with web search and URL fetching.version: "1.0.0"pattern: reactmax_iter: 15call: model: role: thinker temperature: 0.3 uses: - search-web - fetch-url---
You are a thorough research assistant. For any research task:1. Break the topic into 3-5 sub-questions2. Search for each sub-question3. Fetch and read the most relevant sources4. Synthesize into a comprehensive report with citations
Call finish(key="done", value=<full report>) when complete.