>_AFK / Docs

Advisor-led orchestration

Use one capable coordinator to decompose a significant objective, delegate bounded work to focused agents, and bring decisions back to you. AFK keeps the work visible in the browser while agents continue independently, so autonomy remains monitored and steerable.

When to use this pattern

Advisor-led orchestration is useful when a task spans several independent areas, benefits from specialist judgment, or needs a separate verification pass. It is unnecessary for a small change that one session can complete clearly and safely.

Divide responsibilities clearly

RoleResponsibilities
CoordinatorUnderstand the objective, inspect shared constraints, divide the work, choose which tasks can run concurrently, select models and isolation explicitly, reconcile results, and escalate material decisions.
WorkerComplete one bounded assignment, follow repository guidance, verify its conclusions, and return a concise report with evidence, risks, and any decision the coordinator must make.

Ask workers for conclusions rather than full transcripts. A useful report states what changed or was found, what was verified, what remains risky, and where supporting evidence can be inspected.

Run only parallel-safe work concurrently

Parallelize investigations, reviews, tests, or edits to independent areas. Keep work serial when tasks depend on one another or may modify the same files, schema, shared configuration, or public contract. For parallel code changes, use isolation: "worktree" where the execution environment supports it, then deliberately reconcile the results.

agent_spawn({
  prompt: "Inspect authentication flows. Report concrete risks and evidence; do not edit files.",
  description: "Auth Analysis",
  lifecycle: "ephemeral"
})

agent_spawn({
  prompt: "Inspect database access for performance risks. Report evidence; do not edit files.",
  description: "Database Analysis",
  lifecycle: "ephemeral"
})

Select models and cost deliberately

AFK does not automatically decide which model is best for each worker. Choose the connection and model explicitly when delegating across models. Reserve stronger or more expensive models for ambiguous decomposition, architecture, security judgment, or final synthesis. Use a suitable lower-cost model for bounded file discovery, mechanical edits, or routine checks, then inspect the reported usage and result quality.

session_spawn({
  task: "Map the files involved in the billing flow and return a concise dependency list.",
  name: "Billing Map",
  connection: "openai",
  model: "your-fast-model",
  project_path: "/path/to/project",
  isolation: "worktree"
})

session_spawn({
  task: "Assess the proposed billing changes for security and compatibility risks.",
  name: "Billing Risk Review",
  connection: "anthropic",
  model: "your-judgment-model",
  project_path: "/path/to/project",
  isolation: "worktree"
})

Connection names and model IDs come from your own AFK configuration. Keep manual model selection available because provider discovery may be incomplete.

Let delayed work wake itself

Do not spend an agent turn polling every few seconds for CI, a deployment, a batch job, or another delayed external result. When a later check is appropriate, use a session schedule so the agent receives a follow-up prompt at a sensible interval. Cancel the schedule once the outcome is known.

cron_create({
  schedule: "10m",
  description: "Check deployment result",
  prompt: "Check whether the deployment finished. If it did, verify health and cancel this schedule; otherwise report only a material change."
})

Prefer event-driven automations or webhooks when the external system can notify AFK directly. Use recurring prompts for bounded follow-up, not high-frequency polling.

Verify independently

For significant changes, ask a fresh worker or separate session to verify the result from the original requirements and current repository state. Give the verifier the acceptance criteria, not the implementer's summary. Treat summaries as claims to test rather than ground truth.

  • Run the relevant build, tests, lint, or checks where practical.
  • Inspect the actual diff and behavior, not only the final message.
  • Ask for concrete blockers and evidence instead of general confidence.
  • Escalate changes to scope, security posture, spending, or public behavior to a human decision-maker.

Example coordinator prompt

Act as the coordinator for this objective.

1. Inspect the repository and split the work into bounded assignments.
2. Run only independent, non-conflicting assignments in parallel.
3. Choose each worker's connection, model, tools, lifecycle, and isolation explicitly; favor lower-cost models for mechanical work.
4. Ask workers to return concise conclusions, evidence, verification, and blockers — not transcripts.
5. Keep dependent or overlapping edits serial.
6. Use a sensible schedule instead of frequent polling for delayed external work.
7. Have a fresh worker verify significant results against the original requirements and repository state.
8. Stop and ask me before materially changing scope, security, spend, or public behavior.
9. Finish with the integrated result, verification performed, and remaining risks.

Keep the human in the control loop

Use the browser dashboard and session tree to see active work and waiting decisions. Permission modes, plan review, steering, approvals, interrupt, and stop controls let agents work independently without making their work opaque. The goal is not unattended activity at any cost; it is more useful parallel work with clear points for human attention.