Skip to main content
Every request you send goes through a multi-step agent pipeline. The pipeline runs automatically — you describe what you want and agents handle the rest.

Pipeline flow

1

Manager

Reads your request and decides which agent acts next. Returns a JSON decision:
{ "next_agent": "...", "instruction": "..." }
Routes to Planner, Researcher, Builder, or Critic depending on the task.
2

Planner

Receives the Manager’s instruction and your current vault structure. Breaks the task into a concrete plan before any files are written.
3

Researcher

An optional step. Performs deep research on a topic when the task requires external knowledge synthesis. The Manager routes here only when needed.
4

Builder

Writes or edits vault content using structured directives. Each directive tells Second Brain what operation to perform and on which file:
DirectivePurpose
# 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
5

Critic

Reviews the Builder’s output for quality. Approves with CRITIC_APPROVED or sends feedback back to the Builder for revision.
6

Done

The Manager signals "next_agent": "user" to close the task. No further agents are called.

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

The GEMINI_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.