Skip to main content

Departments and bots

A chat is one conversation. Work that comes round again needs something that outlives it.

IsLives in
Departmenta directory plus standing instructions~/.opencli/workspace/<name> by default
Bota chat inside a department, with a jobthat department
Dutya job that comes round on its owna bot

The words are borrowed from an office on purpose. A department is not a folder-with-a-nice-name: it is the boundary of what the work inside it may touch.

Starting from one that already works

Nine departments ship with sample data — files with problems already planted in them — so the first run does something rather than explaining that there is nothing to do.

DepartmentWhat comes with it
FinanceReconcile ledger.csv against statement.csv; chase what is overdue
SupportAnswer what came in; group questions by what they are really about
OperationsList every order still unshipped, and how long it has waited
MarketingTurn notes into a week of posts; group contacts by what they bought
People & adminRead applicants against a role; pull decisions and owners out of notes
LegalCompare their draft against our terms, clause by clause, quoting both
ResearchWhere studies agree, where they conflict, and why
Clinical recordsWhat is recorded, and what a clinician should look at, quoted
EngineeringRead a service and report what would give a wrong answer

Projects → or start with one that already works. It creates the directory, writes the sample files, and hires the bots.

Making your own

Projects → New, then:

  • Name — what it is called
  • Folder — created if it does not exist
  • Standing instructions — given to the agent in every chat opened here

Standing instructions are where the things you would otherwise retype go: how to build it, what not to touch, which numbers are policy. They are separate from the description, which only you read.

Bots

A bot is a chat with a job. The job goes back in every time the bot is woken, so it does not have to be told again what it is for.

Four states, in the Bots panel:

Idlenothing to do
Workinga run is going
Waiting for youit stopped and asked — see Duties
Erroredthe last run failed

Bots handing work to each other

A bot can pass work to another bot by name, with what it did and the files it produced. The receiver starts from those rather than from nothing.

Three refusals keep that from running away, and they are the substance of it:

  • Depth. A chain is capped at eight hops.
  • Repetition. No bot may appear more than three times in one chain.
  • Direction. A bot may only be handed work by a department that has been allowed to. Within one department it is always allowed.

The Bots panel shows every chain, and marks the ones that stopped because they ran out of rope rather than because they finished.

Next

Duties — work that comes round without you starting it.