Pipeline flow
Manager
Reads your request and decides which agent acts next. Returns a JSON decision:Routes to Planner, Researcher, Builder, or Critic depending on the task.
Planner
Receives the Manager’s instruction and your current vault structure. Breaks the task into a concrete plan before any files are written.
Researcher
An optional step. Performs deep research on a topic when the task requires external knowledge synthesis. The Manager routes here only when needed.
Builder
Writes or edits vault content using structured directives. Each directive tells Second Brain what operation to perform and on which file:
| Directive | Purpose |
|---|---|
# vault_file: <path/note.md> | Create or overwrite a note |
# vault_folder: <path> | Create a folder |
# vault_asset: <path/file.ext> | Create a non-markdown file |
# patch_vault_file: <path/note.md> | Apply a unified diff patch to an existing note |
# delete_vault_file: <path/note.md> | Delete a note |
Critic
Reviews the Builder’s output for quality. Approves with
CRITIC_APPROVED or sends feedback back to the Builder for revision.Re-emit logic
If the Builder doesn’t produce any vault directives for a task that requires them, Second Brain automatically requests a re-emit in the correct format. This is transparent — you’ll see it happen in the chat if it occurs.Max rounds
TheGEMINI_MAX_ROUNDS environment variable controls how many reasoning rounds the pipeline can take. Each “round” is one full Manager → Agent → Manager cycle. The default is 3.
See Environment Variables for configuration details.
The Tasks popover in the input bar shows live status for each agent — working while the agent is active and done once it completes.