Appendix › Designing a bot

Designing a bot

10 min read

Appendix. Background reading on how Operation Kit is built. You don't need it to install or use Operation Kit; start with the main docs.

What makes a bot different from a tool or a skill, why every bot is a plain file you can read, the three-question rule for deciding where something belongs, and how a bot's limits are written down and enforced. For the practical side, see Bot files and templates.

On this page
  1. The short version
  2. What a bot is
  3. Why plain files
  4. The three-question rule
  5. One bot per kind of work
  6. Refusal rules as a safety tool
  7. References

The short version

  • A bot has a role and can say no. That's what separates it from a skill (a procedure) or a tool (a connection to a service).
  • A bot is a file you can read. Its instructions are plain text, so you can check what it will do, copy it to another install, and track changes to it.
  • Three questions sort everything. Would it change if you switched provider? Is it a repeatable job with a clear finish? Does it decide, and can it refuse?
  • Limits are written and enforced. A bot's file says what it won't do, and Operation Kit also enforces which tools and folders it may use.

This page explains the design. To create, edit or import a bot, read Bot files and templates and The Bots screen.

What a bot is

Operation Kit keeps three kinds of building block apart. Each one answers a different question, and the difference decides what each is allowed to do:

Raw capability

Tools

How to reach one service: an API, an MCP server, a command-line program or a database. Its address, which secret it needs (by name), its quirks. No opinion about when to use it. Lives in tools/<name>/TOOL.md.

Procedure

Skills

A repeatable job with a clear "done" test, such as "chase invoices more than 30 days overdue". Uses one or more tools. No persona, can't refuse, can't escalate. Lives in skills/<name>/SKILL.md.

Judgment

Bots

A role that decides which procedure to run, and has the authority to push back or hand a decision to a person. Has limits and refusal rules. Uses skills; doesn't contain procedures itself.

The links run one way: bots use skills, skills use tools. A tool never mentions a bot, and a skill never takes on a persona. That one-way direction is what lets you replace a part without touching the others. Switch invoicing provider and you rewrite one tool file. Add a new kind of bot and no existing skill has to change.

Two properties belong to bots alone. A file that lacks either one is not a bot, wherever it is stored:

A roleThe bot has an identity, an area it is responsible for, and a point of view. You can address it by its role ("you are Fernleaf's order desk") and it keeps that role for the whole conversation or job.
Authority to refuseThe bot can weigh a request against its role, its priorities and its limits, and decline. A skill that is following a procedure can't do that: it can only finish or fail.

A survey of AI agents (Wang et al., 2024) singled out a stable role and goal-directed refusal as what separates an agent that decides from a pipeline that only executes. Operation Kit makes both part of the file: the role is the bot's instructions, and the refusals are an explicit list of limits.

How widely something is used doesn't make it a bot. A skill that every bot follows (for example, your house style for customer emails) is still a skill: it has no role and refuses nothing. The layer is decided by what a file does, not by how often it is loaded.

Two places to meet a bot

You talk to bots on the Bots screen. Those bots are described by agents/<slug>/agent.yaml (or agent.md): their instructions, the knowledge base folders they may use, and the tools they may use. Work on the board is assigned to a bot too, and its instructions are a markdown file, agents/<name>.md, that can also list the skills it uses. Both are a role written down in a file. The formats are explained in Bot files and templates.

Why plain files

A bot's instructions are a plain text file, not a database record, a hidden setting or something only an API can change. That has three practical benefits.

You can move it

Any editor can open, compare and change a text file. You can copy a bot to another install, send it to a colleague or keep it in a shared drive, and import it with no special software. Research on role-play in language models (Shanahan et al., 2023) explains why this works: a model takes on a role through the words in front of it, not through hidden settings. Storing the role as readable text means the file you keep is the thing that shapes the behaviour.

You can track changes

You can keep bot files in version control like any other document. Then you can see when a limit was added and why, compare two versions of a bot, and undo a change that made it worse.

You can check it before you trust it

Anyone who can read the file can see what the bot is meant to do and what it won't do, before using it. There is no hidden behaviour on the server that differs from the file. That is what "bring your own bot" means: anyone can inspect a bot, adapt it and use it without reading source code.

A Bots-screen bot for Fernleaf Garden Supply's wholesale orders might look like this:

name: Order desk
slug: order-desk
description: Answers wholesale customers' order questions from the knowledge base and drafts replies.
version: 1.0.0
author: Fernleaf Garden Supply
knowledge_folders:
  - wholesale
  - reference
tools:
  - search
  - read_file
  - email
system_prompt: |
  You are Fernleaf's order desk. You answer wholesale customers'
  questions about orders, stock and delivery, using only the
  knowledge base.

  ## Limits
  - Never promise a delivery date the stock notes don't support.
  - Never offer a discount. Pass discount requests to a person.
  - Never put a password or key in a reply. Refer to secrets by name.

Bot files are meant to be shared, so they must never contain a password or key. Mention a secret by its name and store the value in Settings → Secrets.

The three-question rule

When you are deciding where something belongs (tool, skill or bot), ask three questions in order and stop at the first "yes".

  1. Would you throw it away and rewrite it if you switched provider?

    Your invoicing app's address, which secret holds its key, the way its search pages through results: change invoicing provider and every one of those facts is wrong. That's a tool.

  2. Is it a repeatable job with a clear "done" test, that a capable person could do without knowing your strategy?

    "Find invoices more than 30 days overdue, send each customer a reminder, and confirm every reminder went out." Switching provider means edits, not a rewrite. It has a clear finish and needs no strategy. That's a skill.

  3. Does it decide which job to run, and can it say no?

    A bookkeeping bot that decides whether today is the day to chase invoices, chooses which skill fits, and refuses to waive a late fee without a person's approval. Switching invoicing provider changes nothing in it. That's a bot.

Two shortcuts settle most cases before you get to the questions:

Only bots can refuseIf the file can't decline work, it isn't a bot, however many skills it uses or however complex the work it organizes.
Only tools can skip the "why"If you can't describe the file without naming a business process ("for the spring sale", "before month end"), it isn't a tool.

This mirrors a well-known way of describing AI agents (Sumers et al., 2024): facts about the world, knowledge of how to do things, and a layer that decides what to do. Tools are the facts, skills are the how-to, and bots are the decisions.

The rule is also a clean-up test. If a file sitting in your agents/ folder has no role and refuses nothing, it is a skill dressed as a bot, and it belongs in skills/. Moving it makes the structure honest again, and the bots that need it can list it as a skill.

One bot per kind of work

Every card on the board is assigned to a bot. When the card's job starts, Operation Kit copies that bot's file into the top of the job's prompt, so the job begins already in the right role. Admins manage the roster, and which bots and skills apply where, in Settings → Agents & Skills, and the bot registry and templates on the admin Agents page.

Each bot stands for a boundary: a claim that a set of tasks is better handled by a specialist with a clear scope than by a generalist with none. A small business might have a bookkeeping bot, a web shop bot and a customer service bot, each with its own limits and skills. ReAct (Yao et al., 2022) showed that a model that explains its reasoning before each action gets more tasks right. A specialist reasons more clearly and reliably inside a narrow, well-defined area than a generalist with no edges.

Specialists also limit the damage of a mistake. A mistake by the web shop bot can't touch the accounts if it was never given the accounting tools. You can narrow this further: in Settings → Agents & Skills → Assignments you can limit a bot or skill to one workspace, project or person, and a job then sees only the skills assigned there.

A general-purpose bot is useful for tasks that fit no specialist, and the example files include one (general.md) that hands work to a specialist when one clearly fits. Use it as the fallback, not the default, the way a company routes work to the person who owns it first and to whoever is free last.

Refusal rules as a safety tool

We recommend that every bot file carry a short, explicit list of what the bot won't do. The built-in Operator template, for example, has a "Limits" section: it never marks a card done itself, never approves its own work, doesn't write code, and never puts passwords or keys in a card.

This isn't a polite disclaimer. Constitutional AI (Bai et al., 2022) showed that a model can check and correct its own output against a written set of principles. A bot's limits do the same job at the moment it works: the bot reads them at the start and applies them throughout, with no retraining and no human checking every step.

Limits come in three kinds:

Scope

Area limits

The bot declines work outside its area. The order desk doesn't give tax advice; the bookkeeper doesn't edit the website. This stops a task from quietly picking up side effects in someone else's area.

Quality

Checkpoints

The bot won't go past a checkpoint without evidence. "Don't report a price change as done until the shop shows the new price." A message during the job can't talk it out of that.

Escalation

Hand it to a person

For some decisions, the bot stops and asks: a refund above a set amount, a contract, a change that conflicts with a decision in the knowledge base. Escalating is a way of refusing a decision it isn't allowed to make.

Written rules work better inside a role. Shanahan et al. (2023) found that when a model takes on a role, it sticks more closely to that role's stated limits, so "I don't do X" in a bot's own file is followed more reliably than "please don't do X" in a general prompt.

Limits Operation Kit enforces for you

Written limits are backed by hard ones the bot can't talk its way around:

Only listed toolsA Bots-screen bot can use only the tools in its file. A call to any other tool is refused.
Only listed foldersIts knowledge base tools work only inside its knowledge_folders. A path outside them is refused.
Drafts, not sendsThe email and calendar tools prepare drafts. Nothing is sent until a person presses Send.
Sandboxed board workA job on the board runs in its own sandbox and is graded by an independent reviewer. See How a job runs and Why the board works this way.

Written limits also make a bot's authority easy for people to see. Anyone reading the order desk's file can tell in a minute what it will and won't do, without reading code, running a test or asking the bot. For a bot you didn't write yourself, the file is the contract.

References

Published research behind the choices above.

Last checked against Operation Kit main (f504a64), 11 Nov 2026Suggest an edit