Workflows
Tapplack has two execution modes. Single mode is the default and is enough for most work. Multi mode turns the run into a sequential pipeline, where each agent receives a brief from the previous stage.
Single mode
Section titled “Single mode”{ "mode": "single", "singleAgent": "assistant"}The orchestrator invokes one agent with the full task. That agent plans, calls tools, and produces a
result. One stage artifact is written, plus FINAL.md and run.json.
This is the cheapest and most predictable mode. The default assistant has the full tool set, so
it can read, write, delete, rename, list, run commands, search, and fetch.
Change the agent with:
tapplack config set singleAgent docs_writerMulti mode
Section titled “Multi mode”{ "mode": "multi", "workflowOrder": ["ceo", "cto", "senior_engineer", "qa_reviewer"], "finalAgent": "ceo"}The orchestrator runs workflowOrder in order, then finalAgent if set. The default order is
ceo → cto → senior_engineer → qa_reviewer, with ceo synthesizing at the end.
Enable it:
tapplack config set mode multiHow stages cooperate
Section titled “How stages cooperate”Each stage receives:
- The original task and its position in the pipeline.
- A brief derived from the first stage’s plan. The default CEO stage asks for a research brief and an engineering brief, which the later stages consume.
- Collected context from earlier stages, trimmed to the receiving agent’s budget.
A stage’s output is added to the context passed forward. If a stage declares a side-effecting action that needs approval, the whole pipeline pauses at that point.
The planning decision
Section titled “The planning decision”The first stage can stop the pipeline with a line in its output:
ACTION: answeror
ACTION: clarifyACTION: answer— the task is a question the agent can answer directly; stop after this stage.ACTION: clarify— the request is too vague; stop and ask rather than guess.ACTION: build— real work follows; continue through the pipeline.
A custom first agent that emits no ACTION line is treated as build.
The planner can also declare whether external research is needed. If it says no, a researcher
stage in workflowOrder is skipped rather than run for nothing.
Aborts and failures
Section titled “Aborts and failures”An agent can stop work with:
TASK STATUS: abortedfollowed by a short reason. The pipeline stops at that stage and records the outcome. This is preferred over silently failing.
If a stage throws or finishes with an error, the orchestrator retries that stage up to
maxTaskRetries times, passing the error-log path into the retry so the agent can read the cause and
adapt. If retries are exhausted, the stage is recorded as skipped with the failure reason and the
pipeline stops rather than continuing on a broken foundation.
Final synthesis
Section titled “Final synthesis”finalAgent receives the collected context from every completed stage and produces the final
report. It is optional; set it to null to end with the last stage’s output.
tapplack config set finalAgent ceotapplack config set finalAgent "" # disable synthesisPer-agent enable/disable
Section titled “Per-agent enable/disable”An agent can be disabled without removing it:
{ "agents": { "researcher": { "enabled": false } } }Disabled agents are skipped in the pipeline. This is useful for expensive or optional stages.
Designing a pipeline
Section titled “Designing a pipeline”Good pipelines move from broad to specific:
| Stage | Responsibility | Typical tools |
|---|---|---|
| Planner | Decide action, write briefs. | None. |
| Researcher | Resolve external unknowns. | Files, web. |
| Engineer | Implement. | Full tool set. |
| Reviewer | Verify and test. | Read, list, run. |
| Finalizer | Synthesize. | None or read-only. |
Keep each stage’s tool set narrow. The planner should not run commands; the reviewer should not rewrite code. This makes the run auditable and limits the blast radius of a mistake.
Cost controls
Section titled “Cost controls”| Control | Where |
|---|---|
maxAgentCallsPerRun |
Caps total calls; default 24. |
maxTokens per agent |
Caps each call’s output. |
maxTaskRetries |
Caps stage retries; default 3. |
| Fewer stages | Drop or disable optional agents. |
A loop in one agent cannot starve the rest of the pipeline; the call cap is shared and checked before every delegate.
A worked example
Section titled “A worked example”{ "mode": "multi", "workflowOrder": ["ceo", "researcher", "senior_engineer", "qa_reviewer"], "finalAgent": "ceo", "agents": { "ceo": { "provider": "gemini", "fallback": ["anthropic"], "tools": [] }, "researcher": { "provider": "gemini", "tools": ["read_file", "list_dir", "web_search", "web_fetch"] }, "senior_engineer": { "provider": "anthropic", "fallback": ["groq", "openrouter", "ollama"], "tools": ["read_file", "write_file", "delete_file", "rename_file", "list_dir", "run_command"], "autoApply": false }, "qa_reviewer": { "provider": "openrouter", "tools": ["read_file", "list_dir", "run_command"] } }}Here the engineer must ask before writing or running anything (autoApply: false), while planning
and review use no side effects at all.
- Agents — define the workers.
- Human approval — pause a pipeline safely.
- Runs and artifacts — how stages are recorded.