Skip to content

Design an always-on agent

Filter with rules, then the model

Most incoming events need no action. Drop noise with cheap, fixed rules first (source, channel, allowlists) and send only the ambiguous candidates to the model, whose policies you can edit in plain language.

For each source, set one of three modes:

Fill it in

Your agent's filters

Saved in this browser as you type.

The same split applies to choosing models: route easy requests to a fast, cheap path and escalate only the hard ones to a reasoning model. Suraj Sharma's checklist frames it as resolving about 95% cheaply and escalating 5%; he gives no evidence for the split.

Work ahead, and speak in the channel's format

Use spare compute to start likely work in the background, so you only review a finished draft. Discard what isn't needed.

  • On a meeting invite or to-do: check calendar conflicts, gather background, draft the reply. You review and send.
  • On a reported issue: try to reproduce and fix it silently. Speak only once it's confirmed.

Match what the agent says to where it says it, and keep its reasoning and tool logs out of shared spaces.

Treat the context window as a cache

Put in what the model is likely to need soon, and leave the long tail outside with a pointer it can follow.

Never block the conversation

A long-running tool should start in the background and report back as a new event; a blocking call leaves the agent deaf until it finishes. Replace run() with start() (returns "Started" at once) and stop(), and deliver results as new messages. DeepSeek has built this but hasn't turned it on by default. Sharma suggests a durable workflow engine such as Temporal, so a run resumes from the exact step after a crash or a multi-day approval (no evidence given).

Keep the agent in the cloud and the tools where they live. The agent keeps its state in a database, runs on stateless cloud compute, and reaches your machines through a thin daemon. Your laptop sleeping no longer stops it, and a device that reconnects runs its queued tasks. Anthropic calls this "Decoupling the brain from the hands" (https://www.anthropic.com/research/managed-agents). DeepSeek's prototype is at https://github.com/deepseek-ai/dsh-superagent-prototype (not an official product).

Build delegation into the structure

Telling a single agent to delegate is unreliable, because it decides case by case whether work is "small". In DeepSeek's test, a neutral prompt delegated in 0 of 5 runs and a delegation-first prompt in 4 of 5; the one run where it judged the work "small" produced the slowest results. The workload was synthetic and the authors call it indicative only.

The fix is structural: the coordinator has no tools to do the work, and workers see only their own threads. See Put a coordinator over your bots for the timings and the solo version of this split.

Check yourself

Answer in your head first, then reveal. These come back in Review.

  1. In an always-on agent, what three modes can you set for each incoming source?

    Respond only to explicit requests, treat as candidate events, or ignore.

  2. A tool your always-on agent calls takes ten minutes. How should it run?

    In the background: it returns "Started" at once and delivers the result later as a new event. A blocking call leaves the agent deaf until it finishes.

  3. Why build delegation into an agent's structure instead of telling it to delegate?

    An agent told to delegate decides case by case whether work is "small", so it often doesn't. Give the coordinator no tools to do the work, and it has to delegate.

Sources