跪拜 Guibai
← Back to the summary

Router-Worker Architecture Moves an AI Workbench From Session Firefighting to a Task Board


theme: vue-pro

Hello, I'm lv.

Recently, DeepSeek Harness team published an article about Super Agent architecture. A point in that article directly hit the pain point I hit every day when using my AI Coding workbench:

The upper limit of multi-task execution is limited by the upper limit of human attention.

For me, I can run at most 3 session windows in parallel. Beyond 3, my attention scatters and efficiency drops.

Note, I'm still talking about sessions, like a Claude Code conversation. In essence, it doesn't equal a task.

Because for a task, "in progress" and "completed" should not follow the session lifecycle:

This creates a problem: when I switch between sessions and concurrency climbs, plus priority interruptions, tasks get forgotten easily.

For example, I have three sessions A, B, C in parallel. Session A sends me a notification and I'm about to handle it.

Then an urgent bug arrives. I open a new session D. I've already clicked session A's notification but haven't acted on it yet, and I switch to D.

So session A is temporarily forgotten. Only later, when it suddenly comes to mind, do I reopen that session, which may have been idle for a long time, and continue the task.

Fighting fires between sessions: A's notification was clicked, but it also dropped out of my attention

So switching frequently between sessions doesn't help overall concurrency much.

It just looks busy, but in fact is like a fire chief.

The solution is the Router-Worker architecture mentioned in Super Agent.

This architecture can free me from the state of firefighting between sessions and increase concurrency.

Below I talk about how I gradually integrated it into my workbench.

1. Refactor session management into task management

On this point, my workbench has an innate advantage: it already organizes different sessions into tasks.

First introduce the form of the workbench, three layers:

Left side is the project and its tasks, bottom is a new window for this task, can choose Claude Code, Codex and other mainstream Agents or raw zsh

Three-layer structure: a task can have multiple windows, the task lifecycle is longer than any session

Now the biggest problem: there is no task-level state transition. What I'm still tracking in my head is the state of individual agent sessions.

How to handle it?

Step 1: Define the task state transition lifecycle

I divided tasks into 7 states:

State When it is in this column
Unplanned A canvas I opened casually, not yet running
To-do Work from external triggers (more later), waiting for me to click "Start now"
In progress At least one window is working
Awaiting review A window stopped waiting for me: asking, stuck, stopped without explanation
Awaiting acceptance Window reports done, waiting for my acceptance
Done I accepted and ended it
Cancelled I decided it's not needed

So the home page becomes a task board:

Task board: 7 status columns, a card is a task, each card lists what each of its windows is doing

With task-level state management, even if I get interrupted by external events, when I return to the workbench, I can see at a glance where each task stopped, and continue handling those interrupted, unfinished tasks.

Step 2: Connect session state to task state

Having state is not enough; who changes it?

If I manually drag cards, I'm back to "relying on memory." My approach: task state is not stored, it is derived in real time from things that happen in sessions.

Specifically, two layers:

  1. The window first reports its results for this round. At the end of each round, the agent calls canvas-agents report to say whether it's done and waiting for acceptance (ready), or stuck and needs my answer (blocked), or it decides this isn't needed (dropped). If it stops without reporting, record "stopped without explanation."

  2. The task then calculates its state based on the status of all windows under it. Only events that occurred are stored (a round started, I answered, I clicked pass...), and the state is always computed on the fly.

Look at the simplest case, a task with only one window:

Case 1: window runs, task is 'in progress'; it stops and asks me, task becomes 'awaiting review'; it reports done, task becomes 'awaiting acceptance'; I click pass, task only then becomes 'done'

Now the more common real-development case: one big requirement, several windows each handling a part, running at the same time.

For example, a task board revamp: backend API, board page, task card, mobile side shared among four windows. The four windows have different states; which should the task count as?

There's only one rule: whoever most needs me appears decides.

Case 2: if any window is waiting for my answer, task is 'awaiting review'; if no one is waiting but someone is done, it's 'awaiting acceptance'; if all still running, it's 'in progress'

Two boundaries to be clear:

Thus, I solved the first problem: my attention moved from the session dimension to the task dimension, and tasks no longer slip through the cracks.

2. Integrating Router-Worker

At the task dimension, attention is still easily scattered.

For example, I need to pull context from different information sources to create a task, while also handling tasks; after a task is done, I need to sync the result to the corresponding collaborators.

Even if a requirement is delivered and the task is in 'done' state, a problem may be discovered in the future. Then I have to find that long-completed task, reopen it, dig into historical session windows to investigate, or open a new window based on task context.

The entire task-level scheduling is still manual, done by me.

This feels less laborious than session-level scheduling, but I'm still a hired hand.

I want to grow into a boss, not be a project manager scheduling tasks.

So continue climbing up a layer.

Climb one layer higher: from firefighting between sessions, to watching task states, to only managing requirement flow and acceptance

This is where the Router-Worker architecture really delivers value, more precisely, the Router layer does.

My work form becomes: I only interact with the Router; the Router acts as project manager to coordinate tasks and push Workers (i.e., agent sessions) to work.

Using a team analogy:

I call this role the "Spirit Steward" (精灵总管) in the workbench.

Spirit Steward: the workbench's only Router

The Spirit Steward is a resident agent on the workbench, using Claude by default, changeable in settings. I talk to it first about anything.

It follows the same iron rule as the Router in Super Agent: only schedules, never does the work. It can only use the canvas-agents CLI and external triggers; it doesn't write code or pass my gates for me.

Router-Worker landed on the workbench: external events go to Spirit Steward first, it triages and creates work orders; Workers work and report; I only appear at gates

Applying to my daily scenarios, the Spirit Steward mainly helps me with two kinds of things.

One, it can manage all task situations, specifically:

  1. Batch-creating tasks;
  2. Viewing task execution states;
  3. Dispatching agent sessions in tasks to work.

Some concrete examples:

  1. Batch analysis and creation: based on all issues already accumulated on my GitHub, batch-analyze and create corresponding work order tasks.

Spirit Steward batch analyzes GitHub issues, creating 6 work orders at once: 4 handled directly, 2 need requirement clarification

  1. New task: if I think of something to handle anytime, I don't need to manually click "new task"; I can directly tell it "help me create a new task like this", and it creates and executes it.

  2. Task "after-sales" follow-up: if I find an old bug in a previously done task, I tell it "there's still a problem with that task, help me follow up on it", it finds the previously executed task, reopens it, and opens a new agent session, or continues from the old session for the bug fix.

  3. Don't let hung tickets be forgotten: when a window stops to ask me a question and remains unanswered for over 30 minutes, it pushes a second notification to my phone. Each task card on the board also shows how long it has been waiting.

Two, it receives work directly from multiple channels and starts working.

Connect external triggers. Earlier we directly submit requirements in the Spirit Steward's chat window, like GitHub issue analysis.

But this is not yet the source of requirements; we need to go further, and that's where triggers come in.

The Spirit Steward guides you through connecting external requirement sources via triggers, such as GitHub, Feishu groups, Jira, etc.

When an external trigger receives a new requirement, the Spirit Steward creates a work order task based on it, or directly hands it to a session under an existing work order.

Settings > External triggers: GitHub and Feishu connected, Jira coming soon; right is Spirit Steward guiding step by step to connect Feishu

First look at the GitHub trigger.

Previously when someone filed an issue on GitHub, I had to manually create a canvas, open a window, assign work, and sometimes forget, leading to a backlog of issues.

Now after a project is bound to a GitHub repo, new issues are sent to the Spirit Steward first. It triages by my defined filtering rules: bugs with reproduction steps go straight to "to-do", usage questions are recorded and ignored, and descriptions too vague are brought to me to ask.

Spirit Steward handles 3 GitHub issues: one built as to-do, one ignored per rules, one unclear and asks me

Note, it only creates "to-do", it doesn't start work itself. The assignment step requires me to click "start now". An issue is external input; it shouldn't directly drive an agent to modify code. After task acceptance passes, the system automatically writes a comment and closes the issue, so I don't need to sync with collaborators either.

Now look at the Feishu trigger case.

Suppose we have a "CanvasAgents Product Department" Feishu group with different roles: users, operations, product, R&D, etc.

People will raise different requirements or bugs around CanvasAgents, or chat about various things.

So if it's a genuine requirement or bug, how does it get directly to our Spirit Steward via a trigger to create a work order and dispatch agent sessions?

First, add a bot (named CanvasAgents) to the group, taking the trigger role.

When a user has a requirement, just @ it. It sends the message to the Spirit Steward, who decides whether to take on the requirement.

If it's idle chat, the Steward receives the trigger message and directly rejects; there is no feedback in the group, like "read but not reply."

In the group @CanvasAgents asks about weather as chat, the Steward determines it's unrelated to the project and ignores; a genuine requirement gets replies "received" and "done" in the thread

If it's a genuine requirement, the Steward spins up a real task and session to handle it.

Genuine requirement from Feishu: the Steward accepts the order into the project, opens a window to assign work, and the task board directly enters 'in progress'

Meanwhile on Feishu, the bot creates a thread to report task progress in real time. Users can also send follow-up commands in the thread, and those messages go directly to the Agent Session subscribed to this task, without needing the Spirit Steward (Router) to relay.

Thus a digital employee is born.

Of course, not everyone who @s the trigger bot reaches the Steward; only specific group members on a whitelist can trigger it.

Once you get involved in multi-channel collaboration with team members, a Spirit Steward (Router) that is always online to schedule tasks can greatly reduce attention fragmentation.

The value of multi-channel triggers will be maximized.

This entire practice has now been pushed to Github, and all students can see it.

Also, I will open the "CanvasAgents Product Department" Feishu group, so students can join, play with the digital human, and see how it actually handles tasks.

If you also want to learn, welcome to this party: https://canvasagents.dev


Above, under this system where the Spirit Steward (Router) coordinates multi-channel tasks and dispatches various canvas spirit windows (Agent Session Workers), my work style gradually became more "boss-like" (exploitative).

I only care about results, not how late the Spirit Steward and canvas spirits stayed up for some requirement. I only know when I wake up in the morning and open my phone, I see the tasks pending review and acceptance.

Step by step, no one can become a boss in one bite

I want to share some summaries that I think might be helpful to you.

The core content of this article can be summed up in one sentence: Become a boss, hire reliable Routers and Workers to work for you, delegate authority, amplify scale, and increase concurrency.

But before improving concurrency, you need to first ensure single-task execution quality: give a requirement to a Worker, and it can complete it at high quality.

Otherwise, no matter how good the architecture or scale, if the workers do a crappy job, or ask you about every little problem, you're still hollow and limited by your attention ceiling.

So the core is to get the existing AI scheduling flow for different scenarios working.

What is the standard for an AI scheduling flow to work?

The standard is: for any scenario's requirement, you can answer three questions: definition correct, verification correct, failure recoverable.

I have organized these three questions into an "AI delivery quality triangle model" and shared it in the open-source booklet 《成为 AI Native Builder》.

Essentially, it's the combined use of Skill + CLI + MCP + Subagent in a full product R&D scenario.

For example, for:

And different steps in R&D process:

That's about twenty-odd skills.

CanvasAgents' 20+ skills

Once single-task execution quality is improved, then scale up.

First stabilize the single-task quality triangle, then hand it to the Router to amplify concurrency

Some core technologies used in my CanvasAgents workbench

Excalidraw

The most core concept in the workbench is the canvas. Thanks to Excalidraw, I can incorporate various information from requirement to delivery, including prototypes, design screens, acceptance criteria, etc., and present them on one canvas.

Cloudflare

The whole project is all-in on Cloudflare's ecosystem, using Workers, D1, R2, Durable Objects, etc., deployed on its services, with a monthly cost of $5.

And this $5 includes some of my other projects.

Daemon

It is the core component that lets the workbench dispatch coding agents on the user's local machine. It supports Claude Code, Codex, and basically all mainstream agents on the market, so my workbench can dispatch tasks from multiple ends (phone, tablet, computer) simultaneously.

Skill

These are the twenty-odd skills in the image above. The workbench itself was built with them. This Super Agent requirement was developed in batches from questioning requirements, writing specs, producing wireframes and design screens, R&D, testing, and acceptance, all using the ai-native-workflow skill.