Skip to content

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.

{
"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:

Terminal window
tapplack config set singleAgent docs_writer
{
"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:

Terminal window
tapplack config set mode multi

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 first stage can stop the pipeline with a line in its output:

ACTION: answer

or

ACTION: clarify
  • ACTION: 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.

An agent can stop work with:

TASK STATUS: aborted

followed 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.

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.

Terminal window
tapplack config set finalAgent ceo
tapplack config set finalAgent "" # disable synthesis

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.

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.

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.

{
"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.