Cofounder CLI
Playbooks
Cofounder-defined goals an agent pursues for your company, one routine run at a time, using the cofounder CLI on the company's behalf.
A playbook is a goal Cofounder defines, such as keeping the company's state current or finding a starting price. Cofounder writes and maintains each playbook's instructions, so improvements reach every company on its next routine run.
A playbook run is your company pursuing one playbook. It is one agent in a
sandbox that has the cofounder CLI, signed in as the person who started the
run. The agent works in routine runs: each one is a turn of that same
agent, so it keeps its context and sandbox from one routine run to the next.
Routine runs happen on the run's schedule, or right away when you continue the
run. The agent keeps its progress in two places: Library files people read,
and the run's state, structured data that playbooks runs get returns.
When the goal is met, the agent marks the run complete and its routine runs
stop. A company can have several playbook runs, of the same playbook too.
Find a playbook and start a run
| MCP | CLI | API |
|---|---|---|
playbooks_list | cofounder playbooks list | GET /cofounder-cli/v1/playbooks |
playbooks_get | cofounder playbooks get --playbook-key <key> | GET /cofounder-cli/v1/playbooks/{playbook_key} |
playbooks_runs_start | cofounder playbooks runs start --playbook-key <key> --request-id <uuid> | POST /cofounder-cli/v1/playbooks/{playbook_key}/runs |
start creates the run, starts its first routine run right away, and
schedules the rest on the playbook's default schedule. It spends model
usage. Generate a fresh --request-id UUID and reuse it if the response gets
lost: the request id becomes the run's id, and reusing it never starts a
second run.
Manage a run
| MCP | CLI | API |
|---|---|---|
playbooks_runs_list | cofounder playbooks runs list | GET /cofounder-cli/v1/playbooks/runs |
playbooks_runs_get | cofounder playbooks runs get --run-id <id> | GET /cofounder-cli/v1/playbooks/runs/{run_id} |
playbooks_runs_update | cofounder playbooks runs update --run-id <id> | PATCH /cofounder-cli/v1/playbooks/runs/{run_id} |
playbooks_runs_state_update | cofounder playbooks runs state update --run-id <id> --state <json> | PUT /cofounder-cli/v1/playbooks/runs/{run_id}/state |
playbooks_runs_complete | cofounder playbooks runs complete --run-id <id> | POST /cofounder-cli/v1/playbooks/runs/{run_id}/complete |
runs get shows a run's status (running or completed), state, schedule,
and next routine run time. update changes the --schedule, a standard
five-field cron expression (minute, hour, day of month, month, day of week)
evaluated in the run creator's timezone, or turns scheduled routine runs on
and off with --enabled. The run's agent replaces its state with
runs state update; each playbook defines the shape of its state, which
names its playbook in a playbook field, and state of another shape is
rejected. complete marks the goal met and stops the
run's routine runs; a completed run cannot be reopened, so start a new run to
pursue the goal again.
The agent acts as the run's creator through one company API key, named
Playbook run <id> in cofounder company api-keys list. Each routine run
keeps it valid for another 24 hours; a run that stops lets it expire. The
agent can do anything the creator can do in the company. For the same reason,
only the creator can update, continue, or complete a run, or change its
state; any company member can list and read it.
Continue a run and check its routine runs
| MCP | CLI | API |
|---|---|---|
playbooks_runs_continue | cofounder playbooks runs continue --run-id <id> --request-id <uuid> | POST /cofounder-cli/v1/playbooks/runs/{run_id}/routine-runs |
playbooks_runs_routine_runs_list | cofounder playbooks runs routine-runs list --run-id <id> | GET /cofounder-cli/v1/playbooks/runs/{run_id}/routine-runs |
continue starts one routine run right away, outside the schedule, and
spends model usage like a scheduled one. Reuse its --request-id if the
response gets lost. A routine run is starting until the runner accepts it,
then started; one the runner could not take is failed, with the reason.
What it produced shows up in the run's state and the Library files it writes.
The playbooks
Company state and next steps (company-state) never completes. Every new
company starts with one run of it, owned by the person who created the company.
Its routine runs happen daily at 07:00: each reads the company's new events,
roadmap, and Library, and rewrites general/company_state.md, a synthesis of
where the company stands, and general/next_steps.md, its prioritized plan.
Its state holds a summary, recent changes, risks, next_steps (each with
a title, why, owner, and due date), and the last event sequence it read.
Determine pricing (determine-pricing) works toward a starting price. Its
routine runs happen weekly, Mondays at 07:00. Each gathers evidence about the
product, its buyers, and their alternatives from the company and its Library,
and writes general/pricing.md. Its state holds the recommendation, its
rationale, assumptions, and next_steps to validate the price. The agent
completes the run once the recommendation rests on real evidence; until then
it keeps the recommendation provisional.
Generate video (video-gen) makes the video the user asked for. Its
routine runs happen daily at 08:00: each finds the newest video request in the
company's events, installs HyperFrames, authors an HTML/CSS/GSAP composition,
renders it, and saves the MP4 to media/ in the Library. Its state holds the
request being produced, production status, the deliverable Library path,
and next_steps. The agent completes the run once the requested MP4 is saved
and playable; an unclear ask or a blocked render leaves the run open.