Repository navigation
Agents and operations
Generated from docs/agents.md: edit it there, changes made in the wiki are replaced.
A skill says how a QA activity is done (steps, rules, approval gates, outputs). An agent says who does it: a role with instructions, optional skills and the access it asks for. An agent without skills follows its own instructions; when it declares skills, their procedures and approval gates still apply.
| Kind | Location | Versioned | Editable |
|---|---|---|---|
| Built-in | agents/<category>/<name>.md |
yes (framework) | no — duplicate it to customize |
| Yours | workspace/library/agents/<category>/<name>.md |
no (stays on your computer) | yes |
| Claude Code subagents | .claude/agents/<name>.md |
generated by npm run build from the usable built-in agents |
no |
| Other Claude Code subagents | claude-agents/<name>.md |
yes; npm run build copies them unchanged into .claude/agents/
|
edit the source, then npm run build
|
Categories are defined in agents/categories.json. A category used only by your own agents appears automatically. Your agents can never replace a built-in agent with the same name.
---
name: requirements-analyst
description: Reviews user stories before development ... Never writes test cases.
category: quality
skills: requirements-review, project-context
access: project-write
inputs: User stories # optional: what it needs to start, in words
outputs: review-matrix.json, *.xlsx, *.pdf # optional: files it delivers in the run's outputs folder
outcomes: approved, rejected # optional: the results it can end with (an operation can branch on them)
mcps: # optional: MCP servers it uses
jira: read # read = only queries data; execute = changes something outside Moki
ai: claude # optional: default AI tool
model: sonnet # optional: Claude Code subagent model
metadata:
version: "1.0.0"
status: draft
basedOn: requirements-analyst # only in copies
---
# Requirements Analyst
## Role
## When to use
## How to work
## BoundariesRules (checked by npm run validate for built-in agents and by the app when you save your own):
-
name: lowercase letters, digits and single hyphens; equal to the file name. -
category: equal to the folder name. -
skills: optional, comma-separated names of existing skills. Omit it or writeskills: ""for an agent that follows only its own instructions. -
access:read-only(reads the project, writes nothing),project-write(writes only insideworkspace/projects/<project-id>/) orrepository-write(may also change a linked code repository, after an approved plan). -
metadata.status:stable,draft,pending-migrationorplanned. Onlystableanddraftagents can be used; the description of the others starts with[PENDING MIGRATION]or[PLANNED]. - The four sections
Role,When to use,How to workandBoundariesare required. -
model(optional):haiku,sonnet,opus,fableorinherit, written into the agent's Claude Code subagent; left out, the subagent uses the session's model. Other AI tools ignore it. - Optional, for multi-agent operations (an operation passes the files one agent delivers to the next):
-
inputs: comma-separated, in words (max 80 characters each). -
outputs: comma-separated file names with an extension, no folders;*matches any name (*.pdf). -
outcomes: comma-separated results the agent can end with (up to 8, a word or two each). It writes the one it ended with in its summary (outcome: <result>); an operation follows the arrow of that result. -
mcps: onename: readorname: executeline per MCP server, by its id in Settings › MCP servers. The step gets only the servers its contract names that the project has on (docs/mcp-servers.md). An operation asks for approval before a step that executes. -
ai:claude,codex,cursor-agent,geminiorantigravity; left out, the AI is chosen when it runs. - A
read-onlyagent writes nothing, so it cannot list outputs or execute through an MCP.
-
- In the desktop app, the In an operation section of an agent shows these fields; on your own agents (and in Create agent) they are edited there, without touching the file.
Access levels are instructions to the AI today, written into the agent and the core policies. One exception: a
read-onlybuilt-in agent becomes a Claude Code subagent without the editing tools (disallowedTools: Edit, Write, NotebookEdit); the shell stays for read-only commands, and the agent's Boundaries forbid writing with it. Enforcement by the other AI tools (permission settings per tool) is planned for the project-sharing work.
The framework category maintains Moki itself, not a project: its agents are for developing this repository only — they get a Claude Code subagent here, but cannot be linked to a project, enabled, chosen in an operation, recommended by the plan or run from an activity (isUsableAgent is false for them). moki-consultant (read-only) explains how Moki works and analyzes a change, a diff or a failing check, ending with a proposal that shows the code and its impact. moki-executor (repository-write) implements a proposal the user approved — or analyzes the request itself and stops for approval first — and runs the checks. Both share the moki-architecture skill (layers, business rules, invariants) and the moki-change skill (impact checklist, proposal format, best practices, playbooks, verification), so they differ only in role, where they stop and access. moki-orquestrador (repository-write, runs on the session's model) coordinates them: it asks moki-consultant for the proposal, stops for the user's approval, splits the approved proposal into tasks, runs each with moki-executor (on a cheaper model) in its own git worktree when the tasks touch different files, then integrates and runs the checks on the whole.
Engineering specialists covers Cartógrafo (data and databases), Inventor (solutions), Artesão (interfaces) and Sentinela (API assessment and validation). Their activities load the role directly, preserve each skill's gates and ask for the requested output format. They are independent usable drafts; no operation or external skill installation is required.
project.json may list the agents enabled in that project:
{ "agents": ["requirements-analyst", "test-designer"] }Without the list, every usable agent is enabled. In the desktop app, Set up project (the pencil next to the project's name) has the Agents in this project checkboxes that edit this list. The side panel's Call an agent opens one of them for a conversation about an idea, without an activity.
-
Desktop app: in Open in your AI tool, choose the agent under Who should do it? Agents that use the chosen activity's skill are listed first. The request then starts with
Act as the <name> agent: read <path> and follow it. -
Claude Code: the built-in agents are also subagents (
.claude/agents/), so you can ask "use the requirements-analyst agent to review US-310". -
Gemini CLI and Antigravity, started from Moki, also get the project's usable agents as subagents in
<Moki folder>/.gemini/agents/(name and description, the same instructions). A file you put there yourself is left as it is. An agent installed for one linked folder is also written to that folder's.gemini/agents/, and one installed for every project to~/.gemini/agents/. -
Codex has no subagent folder. The request tells it which agent file to read and follow. Its
codex agentscommand lists past sessions, not these definitions. -
Any other tool: the same request asks the AI to read the agent's file and act as it —
AGENTS.mdlists the agents and tells the AI how.
- In the desktop app open the Agent library (start screen or the people icon in the ribbon).
- Pick an agent and click Duplicate. A copy named
<name>-customis created in your library, withbasedOnpointing to the original. - Click Edit, change the instructions (for example, add your team's conventions to How to work), and Save. Invalid changes are refused with the reason.
Without the app, copy a file from agents/ to workspace/library/agents/<category>/, rename it and its name, and edit it.
In the desktop app, Settings › Operations links agents into an operation: each agent is a card (a step) and an arrow passes the files one agent delivers to the next — right away (Direct) or after your approval (Approval). On an arrow you say which output answers each input of the next agent; inputs nobody answers are asked when the operation starts. Coloured lanes split the board into phases (visual only: the arrows set the order).
- From a step with results, each dot of its card leads to a different step ("if rejected → fixer"); the arrow without a result (otherwise) covers the rest. A result with no arrow ends the operation there.
- Arrows may go back to an earlier step (a loop). A step runs at most N times (set on the board, 3 by default); a loop must have a result to leave it.
- Start: the step chosen with Start with this step, or the one no arrow leads to. One step runs at a time (no steps in parallel).
- A step whose agent executes through an MCP always waits for your approval.
- Operations are saved in
workspace/library/operations/<id>.json(stays on your computer). - Ready-made designs to build: operation recipes.
- In the project's side panel, under Operations, the + links operations to the project (
project.json→"operations"). - Click an operation: choose the AI of each step (each agent's own, or one for all), answer what the agents need to start (text and inbox files) and say what you want. Moki warns when a step uses an MCP server its AI does not have configured.
-
Start operation creates a run (
runs/<date>-op-<id>/):inputs/request.mdholds the request; each step delivers inoutputs/<step>/and, when done, writeshandoff/<step>.md. Moki starts each step in a terminal tab of its AI. - A step is done when its handoff and its declared outputs are there. Then Moki follows the arrow of its result: the next step starts, or waits for your approval. When no arrow fits the result (or the agent did not say it), or a step reached its limit of runs, the run waits for you to choose the way on, or to end it. Each time a step runs it has its own folders (
outputs/s2, thenoutputs/s2-2in a loop). While an agent waits for your answer in its terminal it writeswaiting/<step>.mdand the run shows Waiting for you with the question; answer it right there: your answer is typed into the agent's terminal when it is open, or, when that terminal is gone (closed, or Moki was restarted), Answer and resume starts the step again in a new terminal with the question and your answer (it goes on from what it already delivered). Reopen the step does the same without an answer. Pause lets the running step finish and starts nothing after it; Cancel ends the run and closes the terminal of the step that runs (what was done stays in its folder). - The run opens on its board, as it was drawn when the run started: each card shows how its step is doing (in progress, waiting for you or your approval, done, failed, cancelled; not reached yet, or skipped once the run ended on another branch), the result it ended with and how many times it ran; the arrows taken are highlighted. A click on a card shows, beside the board, each time that step ran: the arrow it came by and the inputs it got, its AI, when it started and ended, its result, summary and files, and the run log (
logs/events.log). List shows the same visits one under the other (the only view for runs started before the board was kept). - Reject a step waiting for your approval with your reasons: the step before runs again with them (within its limit of runs), or the operation ends, cancelled. If a step's terminal closes before it writes its handoff, the step fails and the run is blocked until you try again (what it delivered stays in its folder).
- The side panel shows the status of each run (In progress, Waiting for your approval, Blocked, Paused, Completed); finished runs stay there, folded, as history.
The app has to be open for the next step to start (it can be minimized). You can leave the project while a step runs: its terminal keeps running and comes back when you open the project again; the next step starts when you are back in the project.
Generated from docs/ of Orsi88/moki at main (416a793). Edit the files there; changes made in the wiki are replaced.
🇺🇸 English
Start here
Everyday use
- Projects and workspaces
- Files and the editor
- Notes and quick assistants
- AI terminals
- Calling activities, agents and skills
- Runs and deliverables
- Settings
- Routines and notifications
- Mycroft
- Project links
Capabilities and workflows
Integrations
Help
About
Contributing
🇧🇷 Português
Comece por aqui
Dia a dia
- Projetos e workspaces
- Arquivos e editor
- Notas e assistentes rápidos
- Terminais de IA
- Chamar atividades, agentes e skills
- Execuções e entregas
- Configurações
- Rotinas e notificações
- Ensinar o Moki com o Mycroft
- Links do projeto
Capacidades e fluxos
- Skills de QA e agentes
- Atividades
- Agents and operations
- Receitas de operação
- Especialistas de engenharia
Integrações
Ajuda
Sobre
Para quem contribui