human
human is a two-phase pattern with a pause for human input between phases. Phase 1 prepares a draft or question, pauses for the human to respond, then phase 2 continues with the human’s input.
When to use it
Section titled “When to use it”- Approval workflows (draft → human approves → finalize)
- Interactive research (agent gathers context → human refines direction → agent completes)
- Tasks that need a human checkpoint before committing to a direction
- Any workflow where human judgment should be incorporated mid-run
File structure
Section titled “File structure”agents/my-human/├── AGENT.md ← pattern: human, config└── resume.md ← system prompt for phase 2 (after human input)AGENT.md
Section titled “AGENT.md”---name: draft-approverdescription: Drafts a document and requests human approval before finalizing.version: "1.0.0"pattern: humancall: model: role: writer uses: - search-web---
You are a document writer. Given the requirements:1. Research the topic thoroughly2. Write a complete draft3. Present the draft to the human for review
Call finish with a channel ID as the key and the draft as the value.The channel ID becomes the identifier for the human pause channel.
Example: finish(key="draft-review", value="Here is the draft:\n\n...")resume.md
Section titled “resume.md”You receive the human reviewer's feedback on your draft.
Incorporate all requested changes. If the reviewer approved without changes, return the original draft.If they requested edits, make precisely those edits.
Call finish with key="done" and the final document as value.Scaffold
Section titled “Scaffold”tama add human my-agentHow it works
Section titled “How it works”Phase 1 (AGENT.md body): react loop with tools → finish(key="channel-id", value="draft content...")
── PAUSE ── runtime opens channel "channel-id" in development: waits for stdin input in production: HTTP POST to the channel endpoint
Phase 2 (resume.md): start() → human's response react loop → finish(key="done", value="final result")The channel key
Section titled “The channel key”The key in phase 1’s finish is a channel ID — not a routing word. It:
- Identifies which channel to open for human input
- Appears in the trace so you can correlate human responses to runs
- Enables parallel pauses: different unique IDs can pause and resume independently
Development vs production
Section titled “Development vs production”Development (tama run CLI): the runtime pauses and prompts stdin for input.
Production (Docker): the runtime pauses and exposes a channel ID. Your application POSTs the human response to the runtime’s HTTP API when available.