How it works
Tapplack is deliberately small. A handful of concepts explain almost all of its behavior.
The flow of a task
Section titled “The flow of a task”your input │ ▼intent gate ──► chat / meta / vague ──► local answer, no model call │ ▼orchestrator ──► agent(s) ──► provider + tools ──► artifacts in runs/- Intent gate. A local, dependency-free heuristic classifies input as
chat,meta,question,vague, ortask. Cheap requests are answered without spending tokens. - Orchestrator. For a task, it creates a run directory, invokes the configured agent(s), and writes stage artifacts and a final report.
- Agent. An agent has a title, division, provider, fallback chain, model, temperature, token budget, and a list of tools. It loops: ask the provider, run any requested tools, feed results back, repeat until it produces a final answer or hits a limit.
- Provider. The agent’s primary provider is tried first; on rate limits, server errors, or timeouts the request is retried with backoff, then the next provider in the fallback chain is tried.
- Artifacts. Everything lands in
runs/<run-id>/, plus a session transcript for interactive use.
Single-agent vs multi-agent
Section titled “Single-agent vs multi-agent”mode is the top-level switch.
single(default) runs one agent —singleAgent, which defaults toassistant. The assistant has the full tool set and is the fastest, cheapest way to get work done.multirunsworkflowOrdersequentially, then optionally afinalAgent. The default pipeline isceo → cto → senior_engineer → qa_reviewer, withceoas the final synthesis agent.
Multi-agent mode is opt-in. A multi-agent run passes a brief from each stage to the next, and the final agent synthesizes the result. See Workflows.
Agents
Section titled “Agents”An agent is a named entry under agents in the config. Built-in ids are assistant, ceo,
researcher, cto, senior_engineer, and qa_reviewer, but you can add any id that matches
^[a-z][a-z0-9_-]*$.
Each agent controls:
| Field | Purpose |
|---|---|
provider |
Primary provider id. |
fallback |
Ordered providers to try when the primary fails. |
model |
Model override; otherwise the provider’s configured model is used. |
temperature, maxTokens |
Sampling and budget. |
tools |
Which tools this agent may call. |
reportsTo |
Used in prompts to describe the org chart. |
skills, skillMode |
Which skills are loaded and how. |
autoApply |
Whether side-effecting tools run without a human gate. |
See Agents.
Agents can call a fixed set of tools:
| Tool | Side effect | Purpose |
|---|---|---|
read_file |
No | Read a file in the workspace. |
write_file |
Yes | Create or overwrite a file. |
delete_file |
Yes | Delete a file. |
rename_file |
Yes | Move or rename a file. |
list_dir |
No | List a directory. |
run_command |
Yes | Run a whitelisted binary inside the workspace. |
web_search |
Network | Search the web. |
web_fetch |
Network | Fetch a URL. |
write_file and run_command are the actions gated by human approval when autoApply is off.
delete_file and rename_file are always workspace-confined and are not separately gated.
Workspace and runs
Section titled “Workspace and runs”The agent can only touch files under workspaceDir (default ./workspace), resolved from where
you launched the CLI. Path escapes — .., absolute paths outside the root — are rejected by the
tool layer, not just discouraged in the prompt.
Run output goes to runsDir (default ./runs). Each run is self-contained, so you can archive or
delete it without touching configuration.
See Safety and permissions and Runs and artifacts.
Providers and fallback
Section titled “Providers and fallback”Each provider has an id, an API key (except Ollama), a default model, and a base URL. The active
agent’s chain is its provider followed by fallback.
On a failure the provider factory retries the same provider with exponential backoff
(retryAttempts, retryBaseDelayMs, retryMaxDelayMs), then moves down the chain. The agent
records which provider actually answered, so reports are honest about failover.
See Providers and models.
Skills
Section titled “Skills”Skills are Markdown instruction packs. They can be inline, file-backed, or discovered from
.tapplack/skills/<id>/SKILL.md.
Agents use one of three modes:
off— no skills.manual— pinned skills are preloaded up front. Predictable and cheap. Settingmanualalso turnsautoApplyoff.auto— the model sees a catalogue and calls ause_skilltool on demand. Convenient, but each load is an extra round and may cost more. SettingautoturnsautoApplyon.
See Skills.
Human approval
Section titled “Human approval”If an agent has autoApply: false, a write_file or run_command call is intercepted. The exact
action is held pending; the run stops and the agent explains what it wants to do. You can inspect
the preview and either apply that exact action or keep it pending for /apply.
Applying does not re-run the agent — it executes the reviewed action only. This is what makes the gate trustworthy. See Human approval.
Configuration layers
Section titled “Configuration layers”For every setting the resolution order is:
- Process environment, when explicitly set.
~/.tapplack/config.json(or the file named byTAPPLACK_CONFIG).- Built-in defaults.
The JSON file is created on first use and is never silently replaced if it is invalid. .env files
are not loaded automatically — use real environment variables or the JSON file.
See Configuration and Config file.
Where to go next
Section titled “Where to go next”- Interactive session — the TUI in detail.
- Running tasks — intent gate, retries, cancellation.
- Configuration — the practical editing workflow.