Files
waggle-os/docs/reference/commands.md
shumeiko.it dd6564451a docs: bring the command and local API references up to date (P2.4)
commands.md lists all 23 registered slash commands with their working
aliases and drops the FTS5 and two-mind wording. api.md explains the
bearer session token and that the API is internal, fixes the session
route parameters, lists the memory routes served through the memory
contract, the current chat stream events and the permissions body, and
removes the team, import and KVARK enterprise-pack routes.
2026-11-01 02:01:57 +01:00

135 lines
5.1 KiB
Markdown

# Slash commands
Type `/` in a chat to see the commands with autocomplete. A command is `/name` followed by its
arguments; aliases work the same way as the name. Many commands hand a prepared request to the
agent, which then uses its normal tools and approvals.
The commands are defined in `packages/agent/src/commands/` (`workflow-commands.ts` and
`marketplace-commands.ts`).
## Command list
| Command | Aliases | Arguments | What it does |
|---|---|---|---|
| `/catchup` | `/catch-up`, `/recap` | | Summary of where the workspace stands: recent activity, memories and state |
| `/now` | `/current`, `/where` | | What is happening in the workspace right now |
| `/status` | `/report`, `/progress` | | Project status: tasks, progress, blockers and recent activity |
| `/research` | `/investigate` | `<topic>` | Runs the `research-team` workflow on a topic |
| `/draft` | `/write` | `<type> [topic]` | Drafts a document (memo, report, email, proposal…) with a review cycle |
| `/decide` | `/decision`, `/weigh` | `<question>` | Builds a decision matrix with options, pros, cons, risk and effort |
| `/review` | `/critique`, `/check` | | Has a critic agent review the last answer |
| `/plan` | `/decompose`, `/break-down` | `<goal>` | Breaks a goal into a task list |
| `/spawn` | `/agent`, `/summon` | `<role> [task]` | Starts a specialist sub-agent: `researcher`, `writer`, `coder`, `analyst`, `reviewer` or `planner` |
| `/focus` | `/narrow`, `/scope` | `<topic>` | Narrows the agent's focus to a topic until you change it |
| `/memory` | `/remember`, `/recall` | `<query>` | Searches personal and workspace memory |
| `/search-all` | `/find-all` | `<query>` | Searches personal memory and all workspaces |
| `/skills` | `/abilities`, `/tools` | | Lists the active skills |
| `/plugins` | | | Lists installed plugins and capabilities |
| `/connectors` | `/integrations`, `/connections` | | Lists connected services and their status |
| `/marketplace` | `/mp`, `/market` | `<subcommand> [args]` | Marketplace: `search`, `install`, `packs`, `installed`, `sync` |
| `/workflow` | `/wf` | `<create\|list\|run> [args]` | Creates, lists or runs multi-agent workflows |
| `/export` | | `<memories\|sessions\|all\|workspace>` | Exports workspace data with the agent's help |
| `/import` | | `<source>` | Reads a file, URL or pasted text and saves what matters as workspace memories |
| `/cli` | `/cli-tools` | `[allow\|deny\|discover] [name]` | Shows or changes which command-line programs the agent may run |
| `/pr` | `/pull-request`, `/merge-request` | `<title>` | Creates a pull request from the current branch of the workspace's repository |
| `/settings` | | | Shows the current workspace and agent settings |
| `/help` | `/commands`, `/?` | | Lists all commands |
## Examples
### /catchup
```
/catchup
```
A briefing for when you come back to a workspace: what it is about, recent sessions, decisions
and suggested next steps.
### /research
```
/research applications of quantum computing in drug discovery
```
Runs the `research-team` workflow: research agents investigate the topic and their findings are
combined into one answer.
### /draft
```
/draft report quarterly metrics for Q1
/draft email to the client about the timeline change
```
The first word is the document type.
### /decide
```
/decide Should we use PostgreSQL or MongoDB for the new service?
```
Produces a matrix with a row per option and columns for pros, cons, risk and effort. Ask the
agent to fill it in.
### /spawn
```
/spawn researcher Find recent papers on retrieval-augmented generation
/spawn coder Write a rate limiter middleware
```
The sub-agent works on the task and returns its result to the conversation.
### /memory and /search-all
```
/memory architecture decisions
/search-all project deadlines
```
`/memory` searches personal memory and the current workspace's memory. `/search-all` also
searches every other workspace and groups the results by workspace. See
[memory.md](../memory.md).
### /marketplace
```
/marketplace search research
/marketplace install deep-research
/marketplace packs
/marketplace installed
/marketplace sync
```
| Subcommand | What it does |
|---|---|
| `search <query>` | Searches the catalog, up to 10 results |
| `install <name>` | Finds the best match, runs the security scan and installs it |
| `packs` | Lists the capability packs |
| `installed` | Lists installed packages |
| `sync` | Refreshes the catalog from its sources |
### /workflow
```
/workflow list
/workflow run research-team
/workflow create Research competitors, summarize findings and draft an executive brief
```
## Adding a command
Commands are `CommandDefinition` objects registered with the `CommandRegistry`
(`packages/agent/src/commands/command-registry.ts`):
- `name`: the command name, lowercase, without `/`;
- `aliases`: other names, also without `/`;
- `description` and `usage`: shown in `/help`;
- `handler(args, context)`: returns the reply text. A reply that starts with
`AGENT_LOOP_REROUTE_PREFIX` is sent to the agent as a request instead of shown directly.
Register a new command in `registerWorkflowCommands` or in a registration function of your
own, called from the sidecar (`packages/server/src/local/index.ts`).