Web4Guru AI Operations
Docs · Core Concepts · CEO agent

The CEO agent

The single agent you actually talk to. It takes your goals, decomposes them, delegates to specialists, and reports back — and only surfaces you for decisions only you can make.

TL;DR

The CEO is a long-running agent loop that receives your goals in plain English, decomposes them into a plan, chooses which specialists to call, watches their work, synthesizes results, and files a brief. It will act on its own within your approved scope and will surface cards for decisions outside it.

What the CEO actually is

Mechanically, the CEO agent is a single long-running call to @anthropic-ai/claude-agent-sdk's query() function, living inside the engine process. The prompt gives it a name ("the CEO of your company"), a small tool belt of delegation functions (delegate_to_coding, delegate_to_content, etc.), and a card-emission tool (emit_owner_card) for talking to you.

That is the entire spine. Everything else — the specialists, the tool servers, the MCP plug-ins — hangs off of sub-sessions the CEO opens when it delegates.

What it does, in order

  1. Listens. Reads your message from stdin, pulls in the most recent company memory checkpoint, and recognises where the request fits in your 30-day plan.
  2. Plans. Decomposes the goal into a sequence of steps. For recognised patterns ("launch a landing page"), it picks a playbook. For novel goals, it writes a plan from scratch and asks you to confirm before spending meaningful credits.
  3. Delegates. For each step, it picks the right specialist and calls a delegate_to_* tool. Parallel specialists run concurrently; chained specialists run in sequence. See delegation.
  4. Watches. Each specialist streams heartbeats and results back. The CEO observes; the circuit breaker enforces safety limits in parallel.
  5. Reviews. Each deliverable goes through the Evaluator gate before the CEO accepts it.
  6. Synthesises. Combines specialist outputs into a short, owner-ready summary. Emits it as a report_ready card in the Action Feed.
  7. Checkpoints. Every 25 user turns the engine writes a Markdown checkpoint under ~/.blackbox/memory/checkpoints/ so the next session can resume cleanly.

How it decides

The CEO follows a simple decision tree on every incoming goal:

  • Is this a standing priority? (From your onboarding + 30-day plan.) If yes, act without asking.
  • Is this a recognised playbook? If yes, run it. Credits are predictable; the owner sees a progress indicator.
  • Is this a small single-specialist job? Delegate it, report back.
  • Is it large, novel, or risky? Produce a plan, emit an approval card. Wait for your green light.

Where things sit depends on your autonomy setting. A conservative owner sees more approval cards; a high-autonomy owner gets more autonomous overnight runs. The CEO adapts.

Where the CEO's authority ends

The CEO will not, by design, do any of the following without an explicit approval card from you:

  • Send an email to a person the owner has not authorised as a contact.
  • Make an external API call that has financial impact (Stripe charge, Shopify refund).
  • Delete production content, reset a deployment, or push to a default branch.
  • Spend more than the remaining per-task credit cap on a single step.
  • Disclose personal or business data to a tool not on the connections allow-list.

Everything else is fair game inside the scope you have approved. If the CEO is uncertain, it asks.

How it works in Black Box

The CEO loop lives in apps/engine/src/ceo/loop.ts. It runs on @anthropic-ai/claude-agent-sdk inside a long-lived Node process; stdin is the owner's messages (NDJSON user turns), stdout is the stream of assistant, tool-use, result, and bb_event messages that the UI reads. A checkpoint is written every 25 user turns; a summariser kicks in when the running token estimate crosses 150K so the CEO stays in context indefinitely.

Delegation uses six MCP-exposed tools (delegate_to_coding, delegate_to_content, delegate_to_research, delegate_to_browser, delegate_to_business_ops, delegate_to_evaluator) plus a spawn_parallel_specialists tool for multi-branch work. Each delegate opens a fresh query() with scoped allowed-tools and a per-task working directory.

What the CEO sees that you do not

The CEO reads the full stream of specialist heartbeats, tool-call traces, and error logs. That stream is firehose-large — not something you want in your Action Feed. The CEO's job is to compress it into three-sentence reports for you, and to pull you in only when a human decision is actually required. If you ever want the raw trace, it is available in the Pulse view under Diagnostics.

Frequently asked

Can the CEO act on its own?
Yes — within your approved scope. Novel, expensive, or destructive work always produces an approval card.
Does the CEO write code?
Rarely. It delegates to the Coding Specialist. The CEO coordinates; specialists execute.
Which model does the CEO use?
Claude, via the Black Box credit proxy. You never supply an API key.
What happens when it runs out of context?
A summariser compresses old turns; a checkpoint is written every 25 turns and loaded at the start of the next session.

Related concepts

Next: meet the specialists

The CEO is the spine. The specialists are the hands. Here is the whole roster.