# Introduction
Source: https://docs.clawkitchen.ai/api-reference/introduction
Example section for showcasing API endpoints
If you're not looking to build API reference documentation, you can delete
this section by removing the api-reference folder.
## Welcome
There are two ways to build API documentation: [OpenAPI](https://mintlify.com/docs/api-playground/openapi/setup) and [MDX components](https://mintlify.com/docs/api-playground/mdx/configuration). For the starter kit, we are using the following OpenAPI specification.
View the OpenAPI specification file
## Authentication
All API endpoints are authenticated using Bearer tokens and picked up from the specification file.
```json theme={null}
"security": [
{
"bearerAuth": []
}
]
```
# Agents
Source: https://docs.clawkitchen.ai/clawkitchen/agents
The ClawKitchen home page is effectively the installed-agents dashboard for the current machine.
## What the Agents surface is
The ClawKitchen home page is effectively the installed-agents dashboard for the current machine.
It shows the agents available right now and groups them by team workspace when that can be inferred.
## Why this matters
This gives you a fast answer to practical questions like:
* what agents are installed here right now?
* are they part of a team workspace or personal/unassigned?
* which one do I need to inspect, edit, or debug?
## Grouping behavior
ClawKitchen groups agents by workspace convention when possible.
That means the grouping comes from the local filesystem and workspace structure, not from a detached cloud registry.
If an agent is not clearly tied to a team workspace, it appears as personal or unassigned.
## What you can edit in an agent
The agent editor exposes a few important tabs:
* **Identity** — name, emoji, theme, avatar
* **Config** — a thin config slice such as model id
* **Skills** — workspace-installed skills for that specific agent
* **Files** — editable agent files
## Why the agent page is useful
This is one of the places where ClawKitchen is at its most practical.
Instead of forcing you to hunt through files and config by hand, it gives you a direct operating surface for the parts of an agent that change most often.
## Important mental model
This is not a fake profile editor sitting on top of a mystery backend.
ClawKitchen is editing real config and real files associated with the agent workspace.
That is why the page matters: it gives you a friendlier interface for the same durable artifacts the rest of the system uses.
# Channels and bindings
Source: https://docs.clawkitchen.ai/clawkitchen/channels
A channel binding tells OpenClaw how to connect a messaging surface to your runtime.
## What a binding is
A channel binding tells OpenClaw how to connect a messaging surface to your runtime.
In practical terms, that means ClawKitchen's Channels page is where you manage the wiring for provider-backed communication.
## What the page supports
The current Channels page is intentionally practical and close to the metal.
You can:
* list bindings
* add a binding
* edit raw JSON-backed config
* delete a binding with explicit confirmation
## Why this page matters
A lot of higher-level workflows depend on messaging bindings existing and being correct.
Examples include:
* notifications
* approval flows
* reminders
* inbound channel interactions
So although the Channels page may look simple, it controls important operational plumbing.
## How to think about it
This is not a glossy integrations marketplace. It is an operator surface for real runtime configuration.
That means edits here should be deliberate, especially when a binding is already being used by workflows, reminders, or approval flows.
## Restart expectations
Some channel/config changes may require a runtime restart before the running process fully reflects them.
If the config looks right in the UI but behavior has not updated yet, verify whether the underlying OpenClaw process needs to be restarted.
## A good practice
When you create a new binding, test it quickly with one small message or workflow path before you depend on it in larger automations.
# Cron jobs
Source: https://docs.clawkitchen.ai/clawkitchen/cron-jobs
ClawKitchen's Cron Jobs page focuses on **recipe-installed cron jobs**.
## What the Cron Jobs page shows
ClawKitchen's Cron Jobs page focuses on **recipe-installed cron jobs**.
That distinction matters: this page is meant to surface the jobs created through team and recipe scaffold flows, not every possible scheduled thing on the machine.
## What you can do there
The current surface supports practical operational actions like:
* viewing jobs
* filtering by team
* enabling or disabling jobs
* running a job now
* deleting disabled jobs
* inspecting raw job details
## Why cron matters here
Recipes and teams can define ongoing automated behavior.
That is powerful, but it also means people need a visible place to inspect what is scheduled and whether it is active.
The Cron Jobs page is that checkpoint.
## Team cron vs global cron page
There are really two related experiences:
* the **global** Cron Jobs page
* the **team** cron view inside a Team editor
Together, those give you both fleet-level visibility and team-level management.
## Cron installation mode
ClawKitchen also exposes a setting for cron installation behavior during scaffold.
That setting controls whether recipe-declared cron jobs are:
* installed automatically
* prompted
* or not installed automatically
Because cron can trigger messages or automated work, conservative defaults are often the right choice.
## A good operator habit
Treat the Cron Jobs page like a safety check after scaffold: verify what was installed, what is enabled, and what should remain active before you move on.
# Practical examples
Source: https://docs.clawkitchen.ai/clawkitchen/examples
A common first use of ClawKitchen is turning a bundled recipe into a real working team.
## Create a team from a builtin recipe
A common first use of ClawKitchen is turning a bundled recipe into a real working team.
Typical flow:
1. open **Recipes**
2. choose a builtin team recipe
3. select **Create team**
4. set the team id
5. decide whether cron should be installed during scaffold
6. finish scaffold
7. open the new team in the Team editor
This is the fastest path from “interesting template” to “real operating workspace.”
## Create an agent from a recipe
Typical flow:
1. open **Recipes**
2. select an agent recipe
3. choose **Create agent**
4. set the agent id and display details
5. open the agent editor
6. refine identity, config, files, or skills
## Use the Team editor to inspect a scaffolded team
Typical flow:
1. scaffold a team
2. open its team page
3. inspect the tabs for recipe, agents, files, cron, and workflows
4. verify that the generated structure matches what you expected
This is where ClawKitchen starts to pay off as an operator tool instead of just a creation wizard.
## Add a workflow from an example template
Typical flow:
1. open a team
2. go to **Workflows**
3. add a blank workflow or an example template
4. inspect the generated definition
5. edit it to match your actual process
6. monitor the resulting runs
## Inspect a run after a workflow triggers
Typical flow:
1. open **Runs**
2. filter by team or workflow if needed
3. open the relevant run detail
4. check status, timing, and approval state
5. use that run detail to understand what happened
## Manage a file-backed ticket
Typical flow:
1. open **Tickets**
2. find the ticket in backlog or in-progress
3. open the detail page
4. add comments or ownership updates
5. move it through testing to done
## Add or fix a channel binding
Typical flow:
1. open **Channels**
2. add or select a provider binding
3. edit the JSON-backed config carefully
4. save the change
5. restart runtime if the provider/config path requires reload
## Inspect recipe-installed cron jobs
Typical flow:
1. open **Cron Jobs**
2. filter by team if needed
3. verify which jobs are enabled
4. run one manually if you need a quick sanity check
5. disable or remove jobs you do not want active
## A useful progression for new users
If you are learning the product for the first time, this order works well:
1. scaffold a team from Recipes
2. inspect that team in Teams
3. add or inspect a workflow
4. watch the resulting runs
5. use Tickets and Goals to manage ongoing work
6. use Channels and Cron Jobs to wire the team into real operations
# Goals
Source: https://docs.clawkitchen.ai/clawkitchen/goals
Goals are the durable intent layer in ClawKitchen.
## What Goals are
Goals are the durable intent layer in ClawKitchen.
If tickets represent concrete work items moving through a workflow, goals represent the larger outcomes that should survive beyond any one ticket.
## Canonical storage root
Goals are stored as markdown files in the OpenClaw global workspace:
`~/.openclaw/workspace/notes/goals/`
Each goal is a single file:
`~/.openclaw/workspace/notes/goals/.md`
## Why this matters
This is another strong example of the ClawKitchen model:
* the UI helps you manage the data
* the data itself remains in durable, inspectable files
That makes goals easier to review, back up, script against, and understand outside the browser.
## Frontmatter schema
Goals are markdown files with YAML frontmatter:
```yaml theme={null}
---
id: increase-trial-activation
title: Increase trial activation
status: planned # planned|active|done
tags: [growth, onboarding]
teams: [development-team, marketing-team]
updatedAt: 2026-02-17T00:30:00Z
---
```
The body below the frontmatter is freeform markdown.
## Multi-team association
A goal that spans multiple teams is represented by **one canonical goal file**.
Use `teams: [...]` to associate it with multiple teams. The UI supports filtering goals by team.
## Good use cases for Goals
Use goals when something is:
* bigger than one ticket
* likely to survive several implementation cycles
* shared across teams
* important enough to keep visible even when the active ticket list changes
## Safety and guardrails
The Goals API protects the goal storage root, rejects path traversal, and validates goal ids.
That keeps the feature grounded in a safe, constrained file model instead of turning it into arbitrary file mutation.
# ClawKitchen
Source: https://docs.clawkitchen.ai/clawkitchen/index
ClawKitchen is the local control panel for ClawRecipes-powered teams, agents, workflows, runs, tickets, and operational state.
## What ClawKitchen is
ClawKitchen is the local-first UI for operating a machine that runs OpenClaw and ClawRecipes.
It takes the parts of the system that would otherwise be scattered across terminal commands, workspace folders, config files, and markdown documents, and gives you one place to inspect and operate them.
In practice, ClawKitchen is where you go to:
* see which agents are installed on this machine
* scaffold new agents and teams from recipes
* inspect and edit team files, skills, workflows, and cron jobs
* follow workflow runs and approvals
* work with file-backed tickets and goals
* manage message-channel bindings and a few key runtime behaviors
## Why it exists
ClawRecipes and OpenClaw are powerful because they are file-first and scriptable.
That is a feature, not a bug. But it also means the day-to-day operator experience can get rough fast. Once you have multiple agents, multiple teams, scheduled jobs, workflow runs, approvals, and tickets, the system becomes harder to understand at a glance.
ClawKitchen exists to make that operational layer easier to work with without replacing the file-first model underneath it.
It is not meant to be a separate hosted backend with a mystery database. It is the dashboard for the machine and workspaces you already own.
## How it relates to ClawRecipes
A useful mental model is:
* **OpenClaw** runs agents, tools, channels, sessions, and automation
* **ClawRecipes** defines reusable recipes for agents and teams
* **ClawKitchen** is the UI for browsing, scaffolding, editing, and operating those systems
So ClawKitchen is not the recipe engine itself. It is the control surface around it.
## What you can do in ClawKitchen
The product currently gives you a real operations surface for:
* **Home / Agents** — view installed agents grouped by workspace/team
* **Recipes** — scaffold agents or teams from builtin and custom recipes
* **Teams** — manage team structure, files, skills, cron, workflows, memory, and orchestrator visibility
* **Workflows** — create and edit file-first workflow definitions
* **Runs** — inspect workflow runs, statuses, approvals, and details
* **Tickets** — manage file-backed work items across backlog, in-progress, testing, and done
* **Channels** — manage messaging bindings/config
* **Goals** — create and track durable goals tied to teams
* **Cron jobs** — inspect and manage scheduled jobs
* **Settings** — control a small set of operational behavior like cron installation mode
## The design philosophy
ClawKitchen is built around a few principles:
* **local-first** — it reflects the machine and workspaces you already have
* **file-backed** — the source of truth stays in files/config whenever possible
* **operational** — it is meant to help you run teams, not just admire them
* **human-readable** — it should make agent systems easier to inspect and understand
That combination matters. The goal is not to hide the underlying system. The goal is to make the underlying system easier to operate.
## Who ClawKitchen is for
ClawKitchen is most useful for people who are:
* actively running one or more ClawRecipes-powered teams
* iterating on recipes and workflows
* reviewing runs and approvals
* managing file-backed operational state through a UI instead of only through the terminal
If you only need one-off CLI actions, you may not need Kitchen very often.
But once your setup starts to grow, Kitchen becomes the fastest way to understand what is happening.
## Start here
If you are new to ClawKitchen, the best next pages are:
* [Product tour](/clawkitchen/product-tour)
* [Install and access](/clawkitchen/install-and-access)
* [Recipes and scaffolding](/clawkitchen/recipes-and-scaffolding)
* [Teams](/clawkitchen/teams)
* [Workflows](/clawkitchen/workflows)
* [Practical examples](/clawkitchen/examples)
# Install and access
Source: https://docs.clawkitchen.ai/clawkitchen/install-and-access
ClawKitchen runs as an OpenClaw plugin.
## Install the plugin
ClawKitchen runs as an OpenClaw plugin.
A typical local install flow looks like this:
```bash theme={null}
git clone https://github.com/JIGGAI/ClawKitchen.git ~/clawkitchen
openclaw plugins install --link ~/clawkitchen
openclaw plugins enable kitchen
openclaw gateway restart
```
Then verify that the plugin is loaded:
```bash theme={null}
openclaw plugins list
```
You should see `kitchen` as enabled and available.
## Open the UI
Once enabled, ClawKitchen serves a local web UI.
Depending on your setup, that might mean:
* a localhost-only URL for direct machine access
* a Tailscale- or LAN-reachable address if you intentionally exposed it
ClawKitchen is designed first for local or self-hosted operation, not as an open public web app.
## Authentication basics
ClawKitchen supports auth-related plugin config such as:
* host
* port
* auth token
* auth mode
* optional QA token
The practical rule is simple:
* local access can be lighter-weight
* remote access should stay protected
If you expose Kitchen beyond localhost, keep auth enabled and be deliberate about how that access works.
## QA and headless access
ClawKitchen also supports a QA-oriented token flow for browser automation and testing.
That is especially useful for:
* screenshots
* headless verification
* browser tests that cannot easily complete an interactive auth prompt
Use the dedicated page for that flow:
* [QA / auth](/clawkitchen/qa-auth)
## When a restart is needed
ClawKitchen reflects live OpenClaw and plugin state, but some changes still require a restart, especially when you:
* enable or disable plugins
* change plugin allowlists or runtime config
* change channel or binding config that the running process must reload
If Kitchen and the underlying runtime seem out of sync, a gateway restart is one of the first things to verify.
## A good expectation to set
Kitchen is best understood as a live operational UI layered on top of an existing runtime.
That means install and access problems are often really runtime/config problems wearing a UI-shaped hat.
# Media Generation Setup
Source: https://docs.clawkitchen.ai/clawkitchen/media-generation
This guide covers how to set up image and video generation providers in ClawKitchen workflows, and how to create your own media drivers.
## Quick Start
1. Get an API key from your chosen provider
2. Add the key to `~/.openclaw/openclaw.json` under `env.vars`
3. Restart the gateway: `openclaw gateway restart`
4. The provider appears automatically in the workflow editor's media node dropdown
***
## Architecture
Media generation uses a **driver architecture** in ClawRecipes. ClawKitchen gets its provider list by calling:
```
openclaw recipes workflows media-drivers
```
This returns every registered driver with availability status. **One source of truth** — add a driver in ClawRecipes, and it shows up in the Kitchen dropdown automatically.
```
┌─────────────────────────────────────────────────────┐
│ ClawKitchen (UI) │
│ GET /api/teams/:id/media-providers │
│ │ │
│ ├─ CLI call → ClawRecipes driver registry │
│ ├─ Auto-discover unknown skills (fallback) │
│ └─ HTTP probes (Stable Diffusion, ComfyUI) │
└─────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────┐
│ ClawRecipes (Runtime) │
│ media-drivers/registry.ts │
│ │ │
│ ├─ NanoBananaPro (GEMINI_API_KEY) │
│ ├─ OpenAIImageGen (OPENAI_API_KEY) │
│ ├─ RunwayVideo (RUNWAYML_API_SECRET) │
│ ├─ KlingVideo (KLING_API_KEY) │
│ ├─ LumaVideo (LUMAAI_API_KEY) │
│ └─ GenericDriver (auto-discover fallback) │
└─────────────────────────────────────────────────────┘
```
***
## Image Providers
### Nano Banana Pro (Google Gemini) — Recommended
Google's native image generation via Gemini models. Fast, high quality, competitive pricing.
**Setup:**
1. Get a key at [Google AI Studio](https://aistudio.google.com/apikey)
2. Install the skill: `clawhub install nano-banana-pro`
3. Add to config:
```json theme={null}
{ "env": { "vars": { "GEMINI_API_KEY": "AIza..." } } }
```
4. `openclaw gateway restart`
**Models:** `gemini-2.5-flash-image` (default), `gemini-3.1-flash-image-preview`, `gemini-3-pro-image-preview`
**Pricing:** \~$0.04–$0.08 per image
### OpenAI DALL-E
**Setup:**
1. Get a key at [OpenAI Platform](https://platform.openai.com/api-keys)
2. Add to config:
```json theme={null}
{ "env": { "vars": { "OPENAI_API_KEY": "sk-..." } } }
```
3. `openclaw gateway restart`
**Model:** DALL-E 3
**Pricing:** \~$0.04 (standard), ~$0.08 (HD)
### CellCog
Multi-modal AI platform. Requires 500+ credits for Agent Team mode.
**Setup:**
1. Get a key at [CellCog](https://cellcog.com)
2. Add: `"CELLCOG_API_KEY": "your-key"`
3. `openclaw gateway restart`
***
## Video Providers
### Runway (Gen-4 Turbo) — Top Quality
**Setup:**
1. Get a key at [Runway API](https://app.runwayml.com/settings/api-keys)
2. Add:
```json theme={null}
{ "env": { "vars": { "RUNWAYML_API_SECRET": "your-secret" } } }
```
3. `openclaw gateway restart`
**How it works:** Generates a seed image via DALL-E, then animates with Runway. Requires both `RUNWAYML_API_SECRET` and `OPENAI_API_KEY`.
**Output:** 10s clips at 1280x768
**Pricing:** \~\$0.60 per 10s clip
### Kling (v2) — Budget-Friendly
**Setup:**
1. Get a key at [Kling AI](https://app.klingai.com)
2. Add: `"KLING_API_KEY": "your-key"`
3. `openclaw gateway restart`
**Output:** 5s clips at 16:9
**Pricing:** \~\$0.07 per 5s clip
### Luma (Ray 2)
**Setup:**
1. Get a key at [Luma AI](https://lumalabs.ai/)
2. Add: `"LUMAAI_API_KEY": "your-key"`
3. `openclaw gateway restart`
**Output:** 5s clips at 720p
**Pricing:** \~\$0.32 per 5s clip
***
## Full Config Example
```json theme={null}
{
"env": {
"vars": {
"GEMINI_API_KEY": "AIza...",
"OPENAI_API_KEY": "sk-...",
"RUNWAYML_API_SECRET": "runway-secret",
"KLING_API_KEY": "kling-key",
"LUMAAI_API_KEY": "luma-key"
}
}
}
```
Only add keys for providers you use. After adding: restart gateway, hard-refresh ClawKitchen.
***
## Using Media Nodes in Workflows
### Adding a media node
1. Open the workflow editor
2. Add a node → select **media-image** or **media-video**
3. Pick a provider from the dropdown
4. Write a prompt or use `{{variables}}` from upstream nodes
5. Connect to upstream/downstream nodes
### Template variables
Use the `{{}}` button to insert variables from upstream nodes:
```
Create a marketing image for: {{draft_assets.image_brief}}
```
### skipRefinement
By default, media nodes pass prompts through an LLM refinement step. If your prompt is already detailed (e.g., from a dedicated brief-writing node), add `"skipRefinement": true` to the node config to skip this and send directly to the provider.
***
## Creating Custom Media Drivers
There are two ways to add media generation providers:
### Option 1: Quick — Skill Script (no code changes)
Create a skill with a generation script. ClawKitchen auto-discovers it.
```
~/.openclaw/workspace/skills/my-provider/
├── _meta.json
├── SKILL.md
├── generate_image.py # or generate_video.py / generate_audio.py
└── .venv/ # Python venv with dependencies
```
**`_meta.json`:**
```json theme={null}
{
"name": "my-provider",
"version": "1.0.0",
"description": "My custom image generator"
}
```
**`SKILL.md`** — document required env vars:
```markdown theme={null}
# My Provider
## Requirements
- `MY_PROVIDER_API_KEY` — API key from my-provider.com
```
**`generate_image.py`** — the generation script:
```python theme={null}
#!/usr/bin/env python3
"""Media generation script for my-provider."""
import os
import sys
def main():
# Read prompt from stdin
prompt = sys.stdin.read().strip()
if not prompt:
print("No prompt provided", file=sys.stderr)
sys.exit(1)
# Get API key from environment
api_key = os.environ.get("MY_PROVIDER_API_KEY")
if not api_key:
print("MY_PROVIDER_API_KEY not set", file=sys.stderr)
sys.exit(1)
# Get output directory (set by workflow worker)
output_dir = os.environ.get("MEDIA_OUTPUT_DIR", os.getcwd())
output_path = os.path.join(output_dir, "output.png")
# --- Your generation logic here ---
# Call your API, download the image, save to output_path
# ...
# Print the MEDIA: path — this is how the worker finds the file
print(f"MEDIA:{output_path}")
if __name__ == "__main__":
main()
```
**Script contract:**
| Aspect | Requirement |
| ------------- | -------------------------------------------- |
| **Input** | Prompt via stdin (default) or `--prompt` arg |
| **Output** | Print `MEDIA:/path/to/file` to stdout |
| **Env vars** | `MEDIA_OUTPUT_DIR` for output location |
| **Exit code** | 0 = success, non-zero = failure |
| **Errors** | Print diagnostics to stderr |
**Set up the venv:**
```bash theme={null}
cd ~/.openclaw/workspace/skills/my-provider
uv venv
uv pip install your-sdk-package
chmod +x generate_image.py
```
**Update the shebang** to use the venv Python:
```python theme={null}
#!/path/to/skill/.venv/bin/python
```
Or keep `#!/usr/bin/env python3` — the worker auto-detects `.venv/bin/python` next to the script.
After creating, restart the gateway and refresh ClawKitchen — the provider appears in the dropdown automatically via auto-discovery.
***
### Option 2: Full — Registered Driver (best UX)
For tighter integration — custom display names, explicit env-var validation, argparse support — register a driver in ClawRecipes.
**Step 1: Create the driver file**
```
ClawRecipes/src/lib/workflows/media-drivers/my-provider.driver.ts
```
```typescript theme={null}
import * as path from 'path';
import { MediaDriver, MediaDriverInvokeOpts, MediaDriverResult } from './types';
import { findSkillDir, findVenvPython, runScript, parseMediaOutput } from './utils';
export class MyProvider implements MediaDriver {
slug = 'my-provider';
mediaType = 'image' as const; // 'image' | 'video' | 'audio'
displayName = 'My Provider (Custom)';
requiredEnvVars = ['MY_PROVIDER_API_KEY']; // checked for dropdown availability
async invoke(opts: MediaDriverInvokeOpts): Promise {
const { prompt, outputDir, env, timeout } = opts;
const skillDir = await findSkillDir(this.slug);
if (!skillDir) throw new Error(`Skill dir not found for ${this.slug}`);
const scriptPath = path.join(skillDir, 'generate_image.py');
const runner = await findVenvPython(skillDir);
const scriptOutput = runScript({
runner,
script: scriptPath,
stdin: prompt, // or use args: ['--prompt', prompt]
env: { ...env, HOME: process.env.HOME || '/home/control' },
cwd: outputDir,
timeout,
});
const filePath = parseMediaOutput(scriptOutput);
if (!filePath) throw new Error(`No MEDIA: path in output: ${scriptOutput}`);
return { filePath, metadata: { skill: this.slug, prompt } };
}
}
```
**Step 2: Register in `registry.ts`**
```typescript theme={null}
import { MyProvider } from './my-provider.driver';
const knownDrivers: MediaDriver[] = [
new NanoBananaPro(),
new OpenAIImageGen(),
// ...existing drivers...
new MyProvider(), // ← add here
];
```
That's it. The `workflows media-drivers` CLI command and ClawKitchen's provider dropdown will include your driver automatically.
**Step 3 (optional): Add the env key**
```json theme={null}
{ "env": { "vars": { "MY_PROVIDER_API_KEY": "..." } } }
```
Restart gateway → provider shows as "available" in the dropdown.
***
### MediaDriver Interface Reference
```typescript theme={null}
interface MediaDriver {
slug: string; // Skill folder name
mediaType: 'image' | 'video' | 'audio';
displayName: string; // Shown in UI dropdown
requiredEnvVars: string[]; // Checked for availability
invoke(opts: MediaDriverInvokeOpts): Promise;
}
interface MediaDriverInvokeOpts {
prompt: string; // The generation prompt
outputDir: string; // Where to write output files
env: Record; // Merged env vars
timeout: number; // Max execution time (ms)
config?: Record; // Node-level config overrides
}
interface MediaDriverResult {
filePath: string; // Path to generated file
metadata?: Record; // Optional debug/tracking info
}
```
### Utility Functions (from `media-drivers/utils.ts`)
| Function | Purpose |
| ----------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
| `findSkillDir(slug)` | Searches `~/.openclaw/skills/`, `~/.openclaw/workspace/skills/`, `~/.openclaw/workspace/` |
| `findVenvPython(skillDir)` | Returns `.venv/bin/python` path, throws if not found |
| `runScript({ runner, script, stdin?, args?, env, cwd, timeout })` | `execSync` wrapper, returns stdout |
| `parseMediaOutput(stdout)` | Extracts path after `MEDIA:` prefix |
| `loadConfigEnv()` | Reads `env.vars` from `~/.openclaw/openclaw.json` |
| `findScriptInSkill(skillDir, scriptName)` | Searches skill root + `scripts/` subdirectory |
***
## Troubleshooting
**Provider not in dropdown:**
* Verify the API key is in `~/.openclaw/openclaw.json` under `env.vars`
* Restart gateway + hard-refresh browser
* Check skill dir exists and contains `generate_image.py` or `generate_video.py`
* Run `openclaw recipes workflows media-drivers` to see what's detected
**Authentication errors:**
* Double-check key value — no extra spaces or `=` prefix
* Verify billing is enabled on the provider's dashboard
**Timeouts:**
* Video generation can take 1–5 minutes
* Increase node timeout in config (default: 300s images, 600s video)
**Poor quality:**
* Use `outputFields` to have an LLM craft a detailed brief upstream
* Add a creative brief to `shared-context/memory/` (auto-injected into LLM prompts)
* Set `"skipRefinement": true` when your brief is already detailed
# Orchestrator and advanced operations
Source: https://docs.clawkitchen.ai/clawkitchen/orchestrator
The Orchestrator panel is an advanced operational surface for swarm or orchestrator-style team setups.
## What the Orchestrator panel is
The Orchestrator panel is an advanced operational surface for swarm or orchestrator-style team setups.
Its main job is to give you visibility into what exists and what is running.
## What it can show
Depending on the team, the panel can surface:
* whether an orchestrator exists at all
* the orchestrator agent id and workspace
* tmux sessions
* git worktrees and branches
* active task summary
* settings or config paths
## Important limitation
ClawKitchen is intentionally **read-only** here in the most important sense.
It can show status and useful pointers, but it is not the thing that attaches to tmux or drives the whole swarm directly.
That is a good boundary.
## Why this is still useful
Even read-only visibility is extremely valuable when you need to answer questions like:
* is the orchestrator installed?
* is tmux running?
* what worktrees exist?
* where do I change the relevant settings?
* is there active task state right now?
## Human approval recommendation
For any advanced automation that publishes, deploys, or sends external messages, keep a human approval step in the loop.
That guidance belongs here because orchestrator-style systems can become powerful quickly.
## Who this page is for
This page is mainly for operators and advanced users.
If you are just getting started with Kitchen, focus first on Recipes, Teams, Workflows, Runs, and Tickets.
# Product tour
Source: https://docs.clawkitchen.ai/clawkitchen/product-tour
ClawKitchen makes the most sense when you think of it as an operator dashboard made of a few clear surfaces rather than one giant app page.
## The shape of the product
ClawKitchen makes the most sense when you think of it as an operator dashboard made of a few clear surfaces rather than one giant app page.
The main ones are:
* Home / Agents
* Recipes
* Teams
* Workflows
* Runs
* Tickets
* Channels
* Goals
* Cron jobs
* Settings
Each surface answers a different operational question.
## Home / Agents
This is the installed-agents view for the current machine.
It groups agents by inferred team workspace when possible and gives you the fastest path into editing or inspecting a specific agent.
Use it when you want to answer:
* what agents are installed here?
* which team do they belong to?
* which agent do I need to inspect or edit?
## Recipes
This is where reusable patterns become real teams and agents.
Use it when you want to:
* scaffold a team from a builtin recipe
* scaffold an agent from a recipe
* create a custom team recipe
* inspect the difference between builtin and workspace/custom recipes
This is one of the most important entry points in the whole product.
## Teams
This is the main operating surface once a team exists.
The Team editor is where structure, files, workflows, cron, memory, and advanced operational visibility come together.
If you spend meaningful time running a team, this is where you will spend most of it.
## Workflows
This is where you create and edit file-first workflow definitions tied to a team.
Use it when you want to define process, not just inspect results.
## Runs
This is the answer to “what happened?”
Use it to inspect workflow execution history, run status, approval state, and recent activity across one team or many.
## Tickets
This is the file-backed task board for a team.
Use it for backlog, in-progress work, testing, done, comments, ownership, and moving work through the team workflow.
## Channels
This is the operational plumbing surface.
Use it to manage channel bindings that power messaging, notifications, reminders, and approval flows.
## Goals
This is the durable intent layer.
Use it for higher-level work that should outlive a single ticket or sprint-sized task.
## Cron jobs
This is where you inspect scheduled behavior installed through recipes and team scaffold flows.
Use it when you need to know what automation is active, disabled, or ready to run.
## Settings
This is currently a focused page, not a giant admin center.
Today it mainly controls scaffold-related operational behavior such as cron installation mode.
## A simple way to navigate the product
If you are not sure where to begin, this sequence works well:
1. start in **Recipes** to scaffold something real
2. move into **Teams** to understand the generated structure
3. use **Workflows** and **Runs** to inspect process and execution
4. use **Tickets**, **Goals**, and **Cron jobs** to manage ongoing operations
# QA / auth
Source: https://docs.clawkitchen.ai/clawkitchen/qa-auth
ClawKitchen can be protected by HTTP Basic auth when it is bound to a non-localhost host such as a Tailscale or LAN-accessible address.
## What this is for
ClawKitchen can be protected by HTTP Basic auth when it is bound to a non-localhost host such as a Tailscale or LAN-accessible address.
That is sensible for remote access, but it can make automated QA and browser tooling awkward.
To make testing easier, ClawKitchen supports an optional **QA-only bootstrap token** flow that seeds a short-lived session cookie.
## How it works
If `qaToken` is configured:
1. visit any Kitchen URL with `?qaToken=` once
2. Kitchen sets an HttpOnly cookie named `kitchenQaToken`
3. Kitchen redirects back to the same URL with `qaToken` removed
4. subsequent requests use the cookie instead of triggering the normal Basic auth prompt
## Important notes
* this is **disabled by default**
* the cookie lifetime is short-lived (about 15 minutes)
* it is intended for **dev and QA**, not broad production exposure
## Example config
Set `qaToken` in the Kitchen plugin config alongside `authToken`:
```json theme={null}
{
"kitchen": {
"enabled": true,
"host": "100.x.y.z",
"port": 7077,
"authToken": "",
"qaToken": ""
}
}
```
## Example usage
Open a page once like this:
```text theme={null}
http://HOST:PORT/tickets?qaToken=YOUR_QA_TOKEN
```
After that redirect, the browser should be authorized for a short period without another prompt.
## Why this matters
This is especially useful for:
* screenshot capture
* Playwright/browser automation
* headless testing
* temporary QA access without fighting a Basic auth prompt on every run
## Troubleshooting
If you still get `401 Unauthorized` and a Basic auth challenge:
* verify `qaToken` is actually configured in the running Kitchen instance
* make sure you are hitting Kitchen directly, not a separate proxy applying auth before Kitchen sees the request
* verify you are using the same host/path scope that the cookie is expected to cover
# Recipes and scaffolding
Source: https://docs.clawkitchen.ai/clawkitchen/recipes-and-scaffolding
The Recipes page is where reusable definitions become real agents and teams on your machine.
## What the Recipes page is for
The Recipes page is where reusable definitions become real agents and teams on your machine.
In practice, this is one of the most important entry points in ClawKitchen because it turns ideas and defaults into working structure.
## Builtin vs custom recipes
ClawKitchen works with two broad recipe sources:
* **builtin recipes** — bundled with the ClawRecipes plugin
* **custom recipes** — user-editable recipe files stored in your workspace
That distinction matters:
* builtin recipes are the shipped defaults
* custom recipes are where your own variations and working patterns should live
A good default rule is:
* use builtin recipes to get started quickly
* create or evolve custom recipes when the setup becomes yours
## Common things you do here
From Recipes, you can:
* create a team from a recipe
* create an agent from a recipe
* create a custom team recipe
* inspect recipe details
* edit custom recipes
* remove custom recipes
## Example: create a team from a builtin recipe
Typical flow:
1. Open **Recipes**
2. Pick a team recipe
3. Choose **Create team**
4. Set the team id
5. Decide whether cron jobs should be installed or reconciled during scaffold
6. Finish scaffold and move into the Team editor
This is the fastest way to get a real multi-role workspace up and running.
## Example: create an agent from a recipe
Typical flow:
1. Open **Recipes**
2. Pick an agent recipe
3. Choose **Create agent**
4. Set the agent id and display name
5. Open the new agent in the editor to refine identity, files, model, or skills
This is a good workflow when you want a focused specialist without scaffolding an entire team.
## Example: create a custom team
If builtin recipes get you close but not all the way there, ClawKitchen also supports creating a custom team recipe.
That is useful when you want:
* your own role mix
* custom instructions
* workspace-specific conventions
* a reusable team structure that you can evolve over time
## Important mental model
ClawKitchen helps you scaffold from recipes, but the recipes themselves remain file-backed artifacts.
That is the reason the system is repeatable: you are not just clicking UI state into existence. You are generating durable structures that can be reviewed, reused, versioned, and improved.
## When to use custom recipes
Custom recipes become the right move when you notice that you are repeatedly changing the same things after scaffold.
That is usually a sign that the pattern should live in the recipe itself instead of in post-creation cleanup.
# Runs
Source: https://docs.clawkitchen.ai/clawkitchen/runs
Runs are where workflows stop being definitions and start being operational history.
## What the Runs pages are for
Runs are where workflows stop being definitions and start being operational history.
ClawKitchen exposes run views so you can answer practical questions like:
* what ran recently?
* which team did it belong to?
* did it succeed, fail, or wait for approval?
* what happened inside the run?
## Two views: global and per-team
ClawKitchen exposes runs in two ways:
* **global runs** — a cross-team view of workflow activity
* **team runs** — a filtered view focused on one team's workflows
Use the global view when you want to understand system activity across teams.
Use the team view when you are actively working inside a specific team.
## What you can do there
The current runs surface supports:
* filtering by team, workflow, and status
* inspecting individual run detail
* checking approval state
* understanding whether a run is still active or already completed
## Typical workflow
A common loop looks like this:
1. open a team workflow
2. trigger or observe a run
3. open **Runs**
4. filter to the relevant workflow
5. open the run detail
6. inspect status, outputs, and approval state
## What runs represent
Runs are file-backed operational artifacts tied to workflows in the workspace.
That matters because they are not just transient UI rows. They are part of the observable record of what the system did.
## Good reasons to check Runs
Use the Runs pages when you need to:
* confirm that a workflow actually fired
* see whether a run is stuck or waiting for approval
* compare multiple attempts of the same workflow
* debug why a workflow did not produce the expected result
## A good habit
If a workflow matters, make checking Runs part of the normal operator loop.
That turns workflows from “something we hope is working” into a visible, inspectable part of everyday operations.
# Settings
Source: https://docs.clawkitchen.ai/clawkitchen/settings
The current Settings page in ClawKitchen is intentionally narrow.
## What Settings is today
The current Settings page in ClawKitchen is intentionally narrow.
It is not a giant everything-admin panel. Right now it focuses on a small number of behaviors that affect scaffold and automation decisions.
That is a good thing: the page is trying to control the important defaults without pretending the entire runtime should be configured only through Kitchen.
## Cron installation mode
The most important current setting is **cron installation mode**.
This controls what ClawKitchen should do when a recipe declares cron jobs during scaffold.
Typical modes are:
* install automatically
* prompt
* do not install automatically
## Why this setting matters
Cron jobs can trigger recurring work, reminders, notifications, and other automated behavior.
That means this is not a cosmetic preference. It affects operational safety and how much automation gets turned on by default.
## Recommendation
If you are unsure, use the more conservative option and review jobs before enabling broad automation.
That lines up with the rest of the ClawKitchen philosophy: visible, understandable, file-backed, and deliberate.
## What not to expect
At the moment, Settings is not meant to be a complete replacement for every OpenClaw config surface.
Think of it as a focused operator settings page, not a full-control cockpit.
# Team Memory Management
Source: https://docs.clawkitchen.ai/clawkitchen/team-memory
ClawKitchen provides comprehensive team memory management through a dedicated interface for organizing, editing, and maintaining shared team knowledge. This system ensures consiste
## Overview
ClawKitchen provides comprehensive team memory management through a dedicated interface for organizing, editing, and maintaining shared team knowledge. This system ensures consistent team context across workflows and agent interactions.
## Memory System Architecture
### Memory File Structure
Team memories are organized in the team workspace:
```
shared-context/
├── memory/
│ ├── core-knowledge.jsonl
│ ├── project-context.jsonl
│ ├── team-decisions.jsonl
│ └── procedures.jsonl
├── MEMORY.md
└── README.md
```
### File Types
* **JSONL Files**: Structured memory entries with timestamps and metadata
* **Markdown Files**: Human-readable documentation and procedures
* **README Files**: Team onboarding and overview information
## Memory Tab Interface
### Accessing Team Memory
1. Navigate to your team workspace
2. Click the **"Memory"** tab in the team editor
3. View organized memory files and content
### File Browser
The memory interface provides:
* **File List**: All memory files with size and modification dates
* **Search**: Full-text search across all memory content
* **Filters**: Filter by file type, date range, or content category
* **Sorting**: Sort by name, date, size, or relevance
### Memory Editor
Built-in editor for memory files:
* **Syntax Highlighting**: Markdown and JSON syntax support
* **Live Preview**: Real-time preview for Markdown files
* **Auto-Save**: Automatic saving of changes
* **Version History**: Track changes with git integration
## Types of Team Memory
### Core Knowledge (core-knowledge.jsonl)
Fundamental team information and capabilities:
```json theme={null}
{"type": "capability", "content": "Team specializes in React/Next.js frontend development", "timestamp": "2024-03-15T10:30:00Z"}
{"type": "constraint", "content": "All UI components must follow design system guidelines", "timestamp": "2024-03-15T10:31:00Z"}
{"type": "resource", "content": "Team design system: https://design.company.com", "timestamp": "2024-03-15T10:32:00Z"}
```
### Project Context (project-context.jsonl)
Current project status and objectives:
```json theme={null}
{"type": "objective", "content": "Q2 2024: Launch customer dashboard redesign", "timestamp": "2024-03-15T10:30:00Z"}
{"type": "milestone", "content": "User testing completed March 20, 2024", "timestamp": "2024-03-20T15:00:00Z"}
{"type": "blocker", "content": "Waiting on API changes from backend team", "timestamp": "2024-03-22T09:15:00Z"}
```
### Team Decisions (team-decisions.jsonl)
Important decisions and their rationale:
```json theme={null}
{"type": "decision", "content": "Use TypeScript for all new components", "rationale": "Improved type safety and developer experience", "timestamp": "2024-02-01T14:00:00Z"}
{"type": "policy", "content": "All PRs require two approvals", "rationale": "Ensure code quality and knowledge sharing", "timestamp": "2024-02-15T11:30:00Z"}
```
### Procedures (procedures.jsonl)
Team processes and workflows:
```json theme={null}
{"type": "procedure", "content": "Deploy process: feature branch → staging → production", "steps": ["Create feature branch", "Submit PR", "QA review", "Deploy to staging", "Production deploy"], "timestamp": "2024-02-20T16:00:00Z"}
```
## Memory Injection in Workflows
### Automatic Injection
LLM workflow nodes automatically receive team memory context:
* **Memory Files**: All relevant `.jsonl` and `.md` files
* **Contextual Filtering**: Only relevant memories based on workflow type
* **Token Management**: Optimized memory selection to stay within token limits
### Manual Context Control
Override automatic injection in workflow nodes:
```json theme={null}
{
"id": "specialized_llm_task",
"kind": "llm",
"action": {
"memoryInclusion": {
"files": ["core-knowledge.jsonl", "project-context.jsonl"],
"exclude": ["archived-decisions.jsonl"],
"maxTokens": 2000
}
}
}
```
### Memory Templates
Create reusable memory templates for common workflow types:
```json theme={null}
{
"name": "frontend-development",
"includes": ["core-knowledge.jsonl", "coding-standards.jsonl", "design-system.md"],
"context": "Frontend development workflows requiring design system compliance"
}
```
## Managing Memory Content
### Adding Memory Entries
#### Through the Interface
1. Open the **Memory** tab
2. Select target memory file
3. Click **"Add Entry"**
4. Choose entry type and fill content
5. Save to automatically timestamp and format
#### Programmatically
Memory entries can be added via workflow nodes:
```json theme={null}
{
"id": "record_decision",
"kind": "tool",
"action": {
"tool": "memory.add",
"args": {
"file": "team-decisions.jsonl",
"type": "decision",
"content": "{{decision_content}}",
"metadata": {"source": "workflow", "workflow_id": "{{workflow.id}}"}
}
}
}
```
### Editing Memory
* **Direct Editing**: Edit memory files directly in the interface
* **Bulk Operations**: Import/export memory content
* **Merge Conflicts**: Handle concurrent edits with git-based resolution
* **Validation**: Automatic validation of JSONL format and schema
### Memory Cleanup
Regular maintenance features:
* **Duplicate Detection**: Find and merge duplicate entries
* **Archive Old Content**: Move outdated entries to archive files
* **Size Management**: Monitor memory size and optimize for performance
* **Relevance Scoring**: Identify unused or outdated memory entries
## Memory Search and Discovery
### Full-Text Search
Comprehensive search across all memory content:
* **Keyword Search**: Find entries by content keywords
* **Metadata Search**: Search by entry type, date, or author
* **Fuzzy Matching**: Find entries with similar content
* **Regular Expressions**: Advanced search patterns
### Semantic Search
AI-powered semantic search capabilities:
* **Concept Search**: Find entries related to concepts
* **Question Answering**: Ask questions about team knowledge
* **Context Suggestions**: Recommend relevant memories for current work
* **Knowledge Gaps**: Identify missing information in team memory
### Memory Insights
Analytics and insights about team memory:
* **Usage Patterns**: Which memories are referenced most often
* **Knowledge Coverage**: Gaps in team documentation
* **Memory Growth**: Tracking knowledge accumulation over time
* **Team Contributions**: Who contributes what types of knowledge
## Memory Best Practices
### Content Organization
#### Granular Entries
Keep memory entries focused and specific:
* **One Concept per Entry**: Avoid combining multiple ideas
* **Clear Categories**: Use consistent entry types
* **Descriptive Content**: Make entries self-explanatory
* **Regular Updates**: Keep information current
#### Consistent Structure
Establish team conventions for memory format:
```json theme={null}
{
"type": "coding-standard",
"content": "Use kebab-case for CSS class names",
"category": "frontend",
"importance": "high",
"examples": [".nav-menu", ".sidebar-content"],
"timestamp": "2024-03-15T10:30:00Z",
"author": "jane.developer"
}
```
#### Hierarchical Organization
Use categories and tags for organization:
* **Primary Categories**: Major knowledge areas (technical, process, product)
* **Subcategories**: Specific domains (frontend, backend, design)
* **Tags**: Cross-cutting topics (security, performance, accessibility)
### Maintenance Workflows
#### Regular Reviews
Implement memory maintenance routines:
```
Weekly: Review new entries for accuracy and completeness
Monthly: Archive outdated information and update procedures
Quarterly: Comprehensive memory audit and reorganization
```
#### Version Control Integration
Leverage git for memory management:
* **Change Tracking**: Monitor who changed what and when
* **Branching**: Experimental memory changes in feature branches
* **Rollback**: Revert problematic memory changes
* **Collaboration**: Review memory changes through pull requests
#### Quality Assurance
Ensure memory accuracy and completeness:
* **Peer Review**: Have team members validate new memory entries
* **Source Verification**: Link entries to authoritative sources
* **Regular Validation**: Check that procedures still work as documented
* **Feedback Loops**: Update memory based on workflow outcomes
## Integration with Team Workflows
### Onboarding Automation
Use memory for team member onboarding:
```
New Member → Generate Onboarding Plan → Deliver Key Memory → Track Progress
```
### Knowledge Sharing
Automated knowledge distribution:
```
New Decision → Update Memory → Notify Team → Update Related Workflows
```
### Continuous Learning
Learn from workflow outcomes:
```
Workflow Completion → Extract Lessons → Update Memory → Share Insights
```
## Troubleshooting Memory Issues
### Common Problems
**Memory Not Loading in Workflows**
* Check file permissions and accessibility
* Verify memory file format (valid JSONL)
* Review memory injection configuration
* Test memory file syntax
**Search Not Finding Content**
* Rebuild search index via Memory tab
* Check search query syntax and filters
* Verify content is properly indexed
* Review file permissions
**Performance Issues**
* Monitor memory file sizes
* Archive old or unused content
* Optimize memory selection for workflows
* Review memory injection token limits
**Conflicting Information**
* Implement memory validation workflows
* Regular audits to identify conflicts
* Version control to track change sources
* Clear ownership and update procedures
### Memory Recovery
Disaster recovery procedures:
* **Git History**: Recover from version control
* **Backups**: Restore from team workspace backups
* **Export/Import**: Transfer memory between environments
* **Reconstruction**: Rebuild critical memory from documentation
## Advanced Memory Features
### Memory Templates
Reusable memory structures for new teams:
```json theme={null}
{
"template": "software-team",
"memories": [
{"type": "capability", "content": "Primary technology stack: {{tech_stack}}"},
{"type": "procedure", "content": "Code review process: {{review_process}}"},
{"type": "contact", "content": "Team lead: {{team_lead}}"}
]
}
```
### Memory Automation
Automated memory management:
* **Workflow Integration**: Auto-update memory from workflow outcomes
* **External Sync**: Sync with external knowledge bases
* **Smart Suggestions**: AI-powered memory entry suggestions
* **Maintenance Alerts**: Notifications for outdated or missing memory
### Memory Analytics
Insights into team knowledge:
* **Knowledge Graph**: Visualize relationships between memory entries
* **Usage Metrics**: Track which memories are most valuable
* **Growth Analysis**: Monitor team knowledge accumulation
* **Gap Analysis**: Identify missing knowledge areas
Effective team memory management ensures consistent context across all team activities and enables more intelligent automation through better-informed AI agents.
# Teams
Source: https://docs.clawkitchen.ai/clawkitchen/teams
The Team editor is the main operating surface for a scaffolded team.
## What the Team editor is
The Team editor is the main operating surface for a scaffolded team.
If Recipes is where teams get created, the Team editor is where they become understandable and manageable.
## What you can manage there
A team page typically exposes tabs for:
* **Recipe**
* **Agents**
* **Skills**
* **Cron**
* **Files**
* **Orchestrator**
* **Memory**
* **Workflows**
That makes the team page the place where structure, operational behavior, and working files all come together.
## What each area is for
### Recipe
Use this when you want to understand or evolve the team definition itself.
A practical use case is turning an installed team into a custom editable recipe instead of continuing to rely on a bundled default.
### Agents
Shows the agents or roles that make up the team and lets you inspect or navigate into them.
### Skills
Use this to see or install team-relevant skills that should be available across the team workspace.
### Cron
This is where scheduled behavior becomes visible and manageable for the team.
### Files
One of the most important tabs in the whole product.
The system is file-first, so direct visibility into team files is a major part of understanding what the team is actually doing.
### Orchestrator
Advanced operational visibility for swarm/orchestrator setups.
### Memory
A place to inspect memory-related artifacts and conventions tied to the team.
### Workflows
Where the team's workflow definitions live and where you branch into workflow editing and run inspection.
## Practical example
A common real-world loop looks like this:
1. scaffold a development team from a recipe
2. open the team in ClawKitchen
3. inspect files and roles
4. verify cron behavior
5. inspect workflows
6. make adjustments to the recipe or the team files as needed
That is the heart of the ClawKitchen experience: not just creating a team, but actually operating it.
## The important mindset
The Team editor is valuable because it lets you work with a real, durable team workspace through a UI.
It does not replace the workspace. It helps you see and manage it.
# Tickets
Source: https://docs.clawkitchen.ai/clawkitchen/tickets
Tickets in ClawKitchen are file-backed work items for a team.
## What Tickets are in ClawKitchen
Tickets in ClawKitchen are file-backed work items for a team.
They are not a separate hosted issue tracker hidden behind the UI. The UI is managing the team's ticket files and making that workflow easier to operate.
## Board stages
The ticket board uses the familiar working stages:
* backlog
* in-progress
* testing
* done
That makes it useful for day-to-day coordination, but the important point is that the state is still reflected in the team's filesystem and ticket conventions.
## What you can do
From the Tickets surface, you can:
* browse the board by stage
* open ticket detail
* comment on tickets
* assign ownership
* move tickets between states
* move tickets to goals
* delete tickets when appropriate
## Why this matters
This is one of the clearest examples of the ClawKitchen philosophy.
Instead of forcing work management into a separate SaaS app, ClawKitchen gives you a UI for a file-first workflow. That keeps the work state:
* inspectable
* scriptable
* portable
* reviewable outside the browser
## Practical example
A common loop looks like this:
1. a request becomes a ticket
2. it appears in backlog
3. someone takes it into in-progress
4. comments and verification notes get added
5. it moves to testing
6. it lands in done when complete
That is straightforward in the UI, but still backed by durable files.
## Good expectation setting
If you are used to a hosted ticketing app, the important difference here is that ClawKitchen is not trying to replace the underlying file workflow. It is trying to make that workflow easier to operate.
# Troubleshooting
Source: https://docs.clawkitchen.ai/clawkitchen/troubleshooting
ClawKitchen reflects live runtime and file-backed state.
## Kitchen loads but data looks wrong or stale
ClawKitchen reflects live runtime and file-backed state.
If the UI looks stale, first check whether:
* the relevant plugin is enabled
* the underlying OpenClaw process needs a restart
* the underlying files or workspace actually changed the way you expect
## A page says a plugin feature is unavailable
Many Kitchen surfaces are thin wrappers over plugin/runtime capabilities.
If a feature says support is unavailable, verify the corresponding plugin is loaded and that Kitchen is interpreting current runtime state correctly.
Examples include workflow-related optional plugins such as `llm-task`.
## Workflows exist but runs do not appear
Check the workflow's team context and verify the runtime side that actually processes or schedules work is operating correctly.
Kitchen can surface workflow definitions and run state, but the execution path still depends on the underlying OpenClaw/runtime setup.
## Channel changes do not seem to take effect
Bindings/config changes may require a restart depending on what changed.
If the config looks correct in the UI but behavior has not updated, restart the relevant runtime and test again.
## Cron jobs are missing or not behaving as expected
Check:
* whether the recipe or team actually installed cron jobs
* whether cron installation mode was set to off, prompt, or on during scaffold
* whether the team's `notes/cron-jobs.json` mapping exists and looks correct
* whether the job is currently enabled
## Builtin vs custom recipe confusion
Remember:
* builtin recipes come from the plugin bundle
* custom recipes live in your workspace and are the safer place for your own edits
If you need something editable and reusable, prefer a custom recipe rather than mutating a bundled default.
## Remote or auth issues
If you are accessing Kitchen remotely, verify host and auth settings and avoid assuming localhost rules still apply.
For automated browser or test flows, use the documented QA auth path instead of fighting an interactive prompt.
## Useful debugging mindset
When something looks wrong in Kitchen, ask two questions:
1. is the underlying file or runtime state actually correct?
2. is Kitchen failing to reflect that state accurately?
That distinction helps you find root causes much faster.
# Workflow Visual Editor
Source: https://docs.clawkitchen.ai/clawkitchen/workflow-visual-editor
ClawKitchen's workflow visual editor is the primary interface for creating, editing, and managing team workflows. It provides a drag-and-drop interface for building complex automat
## Overview
ClawKitchen's workflow visual editor is the primary interface for creating, editing, and managing team workflows. It provides a drag-and-drop interface for building complex automation workflows without writing JSON by hand.
## Creating a New Workflow
### From Template
1. Navigate to your team's **Workflows** page
2. Click **"Add Example Workflow Template"**
3. Choose from available templates (e.g., "Marketing Content Pipeline")
4. The template is added to your team workspace and opens in the editor
### From Scratch
1. Navigate to your team's **Workflows** page
2. Click **"Create New Workflow"**
3. Enter a workflow name and ID
4. Click **"Create"** to open the blank workflow in the editor
## Visual Editor Interface
### Canvas
The main editing area where you build your workflow graph:
* **Drag and drop** nodes from the node palette
* **Connect nodes** by dragging from output ports to input ports
* **Pan** by dragging empty canvas space
* **Zoom** using mouse wheel or zoom controls
### Node Palette
Located on the left side, organized by category:
* **Start/End**: `start`, `end` nodes for workflow structure
* **Logic**: `llm` nodes for AI-powered content generation
* **Actions**: `tool` nodes for executing commands and actions
* **Media**: `media-image`, `media-video`, `media-audio` for content generation
* **Human**: `human_approval` nodes for manual review steps
* **Output**: `writeback` nodes for saving results
### Properties Panel
Located on the right side when a node is selected:
* **Basic Settings**: Node ID, display name, description
* **Configuration**: Node-specific settings and parameters
* **Input/Output**: Configure data flow between nodes
## Working with Nodes
### Adding Nodes
1. **Drag from palette**: Drag a node type from the left palette onto the canvas
2. **Quick add**: Double-click empty canvas space to open node selection dialog
3. **Copy/paste**: Select existing nodes and use Ctrl+C / Ctrl+V
### Configuring Nodes
Select a node to open its properties panel:
#### LLM Nodes
* **Agent Assignment**: Choose which team agent executes this node
* **Prompt**: Either inline prompt text or path to prompt template file
* **Model Override**: Optional model selection (overrides workflow default)
* **Output Format**: JSON schema or expected output structure
#### Tool Nodes
* **Agent Assignment**: Choose executing agent
* **Tool Selection**: Choose from available tools (fs.append, outbound.post, message, etc.)
* **Parameters**: Configure tool-specific arguments
* **Error Handling**: Define behavior on tool failure
#### Media Nodes
* **Agent Assignment**: Choose executing agent
* **Media Type**: image, video, or audio
* **Prompt Source**: Inline prompt or upstream node output
* **Provider Settings**: Auto-discovered from available skills
#### Human Approval Nodes
* **Agent Assignment**: Choose approver
* **Approval Binding**: Select configured approval channel/method
* **Instructions**: Custom approval prompt text
* **Timeout**: Optional approval deadline
### Connecting Nodes
Create edges between nodes to define execution flow:
1. **Hover over node** to see output ports (small circles on node edges)
2. **Drag from output port** to input port of target node
3. **Set edge conditions**: Choose success, error, or always
4. **Multiple connections**: Nodes can have multiple incoming and outgoing edges
#### Edge Types
* **Success** (green): Execute target node only if source succeeds
* **Error** (red): Execute target node only if source fails
* **Always** (blue): Execute target node regardless of source outcome
## Advanced Features
### Template Variables
Use template variables in node configurations:
* `{{run.id}}`: Current workflow run ID
* `{{workflow.id}}`: Workflow identifier
* `{{date}}`: Current date/time
* `{{upstream_node.output}}`: Output from previous nodes
### Node Dependencies
Configure complex dependencies in the properties panel:
* **Input From**: Specify which upstream nodes this node waits for
* **Data Binding**: Map specific output fields from upstream nodes
* **Conditional Logic**: Use edge conditions for branching workflows
### Workflow Settings
Access via the gear icon in the top toolbar:
* **General**: Workflow name, description, default model
* **Triggers**: Configure cron schedules or manual triggers
* **Approvals**: Set up approval bindings and notification channels
* **Variables**: Define workflow-level template variables
## Workflow Templates
### Marketing Content Pipeline
Complete pipeline for content creation and distribution:
1. **Draft Content** (LLM) → Generate marketing copy
2. **Generate Visuals** (Media-Image) → Create supporting images
3. **Human Review** (Approval) → Manual content review
4. **Publish** (Tool) → Post to social media platforms
### Documentation Update
Automated documentation maintenance workflow:
1. **Scan Changes** (Tool) → Check for code/feature changes
2. **Draft Updates** (LLM) → Generate documentation updates
3. **Review** (Approval) → Human review and approval
4. **Commit** (Tool) → Update documentation files
### Customer Support Escalation
Automated support ticket processing:
1. **Analyze Ticket** (LLM) → Categorize and assess urgency
2. **Route Decision** (branching edges) → Different paths based on priority
3. **Auto-Response** (Tool) → Send initial customer response
4. **Human Handoff** (Approval) → Transfer to human agent if needed
## Best Practices
### Workflow Design
* **Start simple**: Begin with linear workflows before adding complexity
* **Use descriptive names**: Clear node IDs and descriptions improve maintainability
* **Add error handling**: Include error paths for critical operations
* **Document dependencies**: Note external requirements in workflow description
### Node Configuration
* **Test incrementally**: Use manual runs to test individual node configurations
* **Use templates**: Leverage prompt templates for reusable content
* **Monitor outputs**: Check node output files to debug issues
* **Set timeouts**: Configure appropriate timeouts for long-running operations
### Team Collaboration
* **Consistent naming**: Establish team conventions for node and workflow naming
* **Version control**: Workflow files are stored in git for change tracking
* **Document workflows**: Add descriptions explaining workflow purpose and usage
* **Share templates**: Create reusable workflow templates for common patterns
## Troubleshooting
### Common Issues
**Node Not Executing**
* Check agent assignment is valid
* Verify all required parameters are configured
* Check incoming edge conditions are satisfied
* Review run logs in the Runs page
**LLM Node Failures**
* Verify llm-task plugin is available
* Check model configuration and availability
* Review prompt template syntax
* Ensure agent has appropriate permissions
**Tool Node Errors**
* Verify tool availability in current environment
* Check parameter formatting and values
* Review tool-specific documentation
* Test tool independently via CLI
**Approval Timeouts**
* Check approval binding configuration
* Verify notification delivery
* Review approval channel accessibility
* Consider increasing timeout values
### Debugging Workflows
1. **Use Run Detail pages**: Inspect individual run execution
2. **Check node outputs**: Review generated content and data
3. **Monitor logs**: Look for error messages and execution traces
4. **Test manually**: Use "Run Now" to test workflow changes
5. **Simplify temporarily**: Remove complex nodes to isolate issues
## Integration Points
### With ClawRecipes
* Workflows are stored as `.workflow.json` files in team workspace
* Visual editor generates valid ClawRecipes workflow format
* Changes sync automatically with file system
* Compatible with ClawRecipes CLI tools
### With Team Management
* Agent assignments use team member definitions
* Approval bindings connect to team communication channels
* Workflow permissions inherit from team access controls
* Shared templates available across team workspaces
### With External Tools
* Tool nodes integrate with OpenClaw tool ecosystem
* Media nodes auto-discover available generation skills
* Approval nodes connect to configured messaging platforms
* Output nodes can trigger external webhooks or APIs
This visual editor makes workflow creation accessible while maintaining the power and flexibility of the underlying ClawRecipes format.
# Workflows
Source: https://docs.clawkitchen.ai/clawkitchen/workflows
ClawKitchen's workflow system provides a complete visual interface for creating, managing, and operating automation workflows. Built on the file-first ClawRecipes foundation, it co
## Overview
ClawKitchen's workflow system provides a complete visual interface for creating, managing, and operating automation workflows. Built on the file-first ClawRecipes foundation, it combines ease-of-use with the power and flexibility of code-based workflows.
## Core Concepts
### File-First Architecture
Workflows in ClawKitchen are real operating artifacts stored as files in your team workspace:
* **Portable**: Workflows can be version controlled, shared, and backed up
* **Inspectable**: Direct file access for debugging and understanding
* **Durable**: Workflows persist independently of the UI
* **Collaborative**: Team members can edit workflows through git
### Visual Editor
The workflow visual editor provides:
* **Drag-and-Drop Design**: Build workflows without writing JSON
* **Node Palette**: Pre-built components for common workflow tasks
* **Real-Time Validation**: Immediate feedback on workflow configuration
* **Template System**: Start with proven workflow patterns
### Execution Engine
Workflows are executed by the ClawRecipes runtime:
* **Distributed**: Nodes can run on different agents
* **Resilient**: Automatic retry and error handling
* **Observable**: Complete audit trails and debugging information
* **Scalable**: Handle complex multi-step automations
## Workflow Components
### Node Types
#### Control Nodes
* **Start**: Entry point for workflow execution
* **End**: Explicit workflow completion point
#### Logic Nodes
* **LLM**: AI-powered content generation and decision making
* **Human Approval**: Manual review and approval steps
#### Action Nodes
* **Tool**: Execute commands, send messages, manipulate files
* **Writeback**: Record workflow results in team files
#### Media Nodes
* **Media-Image**: Generate images from text prompts
* **Media-Video**: Create video content automatically
* **Media-Audio**: Generate audio and voiceover content
#### Edge Types
* **Success**: Execute when previous node succeeds
* **Error**: Handle failure cases and errors
* **Always**: Execute regardless of previous node outcome
### Advanced Features
#### Template Variables
Dynamic content insertion throughout workflows:
* **Run Context**: `{{run.id}}`, `{{workflow.id}}`, `{{date}}`
* **Node Outputs**: `{{previous_node.result}}`, `{{draft_content.title}}`
* **Team Data**: `{{team.name}}`, `{{agent.role}}`
#### Memory Integration
Automatic team memory injection into LLM nodes:
* **Context Awareness**: Workflows understand team knowledge and procedures
* **Consistent Outputs**: AI responses align with team standards and decisions
* **Learning**: Workflows improve based on accumulated team experience
#### Approval Workflows
Human oversight and control:
* **Configurable Bindings**: Connect to Slack, Discord, email, or custom channels
* **Rich Context**: Approvers see full workflow context and generated content
* **Revision Cycles**: Support for feedback and iteration
## Getting Started
### Creating Your First Workflow
1. **Navigate to Workflows**
* Open your team workspace
* Click the "Workflows" tab
* View existing workflows or create new ones
2. **Choose Creation Method**
* **From Template**: Start with proven patterns (recommended)
* **From Scratch**: Build completely custom workflows
* **Import**: Load workflows from files or other teams
3. **Use the Visual Editor**
* Drag nodes from the palette onto the canvas
* Connect nodes to define execution flow
* Configure each node's properties and settings
* Test with "Run Now" functionality
### Recommended Workflow Templates
#### Marketing Content Pipeline
Complete content creation and distribution:
```
Draft Content → Generate Visuals → Human Review → Publish to Platforms
```
#### Documentation Maintenance
Keep documentation current with code changes:
```
Detect Changes → Draft Updates → Review → Update Files → Notify Team
```
#### Customer Support Automation
Intelligent ticket routing and response:
```
Analyze Ticket → Route by Priority → Generate Response → Human Handoff
```
## Workflow Operations
### Triggering Workflows
#### Manual Execution
* **Run Now**: Immediate workflow execution for testing
* **Scheduled Runs**: One-time execution at specified time
* **Bulk Operations**: Run workflows across multiple contexts
#### Automated Triggers
* **Cron Schedules**: Time-based workflow execution
* **Event Triggers**: React to external events or changes
* **Chain Execution**: Workflows that trigger other workflows
### Monitoring and Debugging
#### Run Inspection
Comprehensive visibility into workflow execution:
* **Live Status**: Real-time workflow progress
* **Node Outputs**: Generated content and data at each step
* **Error Details**: Complete error context and stack traces
* **Performance Metrics**: Execution time and resource usage
#### Approval Management
Streamlined approval workflows:
* **Pending Approvals**: Dashboard of items awaiting review
* **Approval History**: Complete audit trail of decisions
* **Bulk Actions**: Approve or reject multiple items
* **Delegation**: Route approvals to appropriate team members
### Workflow Collaboration
#### Team Editing
* **Concurrent Access**: Multiple team members can edit workflows safely
* **Change Tracking**: Git integration for version control
* **Permission Management**: Control who can edit vs. run workflows
* **Review Process**: Optional approval for workflow changes
#### Knowledge Sharing
* **Workflow Libraries**: Share successful patterns across teams
* **Documentation**: Rich descriptions and usage guides
* **Template Creation**: Convert working workflows into reusable templates
* **Best Practices**: Team conventions and standards
## Advanced Capabilities
### Integration Ecosystem
#### Tool Integration
Extensive tool ecosystem support:
* **Native Tools**: Built-in support for common operations
* **Skill System**: Extensible through OpenClaw skills
* **API Connectors**: Connect to external services and APIs
* **Custom Tools**: Build team-specific automation tools
#### Media Generation
AI-powered content creation:
* **Multi-Provider**: Support for multiple generation services
* **Auto-Discovery**: Automatic detection of available capabilities
* **Quality Control**: Human review and iteration cycles
* **Asset Management**: Organized storage and reuse of generated content
#### External Publishing
* **Social Media**: Direct publishing to Twitter, LinkedIn, Facebook
* **Documentation**: Update wikis, knowledge bases, and documentation
* **Communication**: Send notifications and updates to team channels
* **Data Export**: Push results to databases and external systems
### Performance and Scalability
#### Optimization
* **Parallel Execution**: Run independent nodes simultaneously
* **Caching**: Reuse expensive computations and API calls
* **Resource Management**: Control memory and compute usage
* **Rate Limiting**: Respect external service limits
#### Monitoring
* **Metrics Dashboard**: Track workflow performance and success rates
* **Alerting**: Notifications for failures and performance issues
* **Logging**: Comprehensive logs for debugging and auditing
* **Analytics**: Usage patterns and optimization opportunities
## Best Practices
### Workflow Design
* **Start Simple**: Begin with linear workflows before adding complexity
* **Error Handling**: Include error paths for all critical operations
* **Modularity**: Break complex workflows into reusable components
* **Documentation**: Clearly describe workflow purpose and usage
### Team Collaboration
* **Naming Conventions**: Consistent workflow and node naming
* **Testing**: Thorough testing before deploying to production
* **Version Control**: Use git branches for experimental changes
* **Knowledge Transfer**: Document team-specific patterns and decisions
### Security and Governance
* **Access Control**: Appropriate permissions for editing and execution
* **Approval Gates**: Human oversight for sensitive operations
* **Audit Trails**: Complete records of workflow changes and executions
* **Secret Management**: Secure handling of API keys and credentials
## Troubleshooting
### Common Issues
**Workflow Won't Start**
* Verify all required agents are available
* Check workflow trigger configuration
* Ensure necessary plugins are installed
* Review team permissions and access
**Node Execution Failures**
* Check node configuration and parameters
* Verify tool availability and permissions
* Review error logs in run detail pages
* Test node configuration independently
**Approval Timeouts**
* Verify approval binding configuration
* Check notification delivery to reviewers
* Review approval channel connectivity
* Consider timeout value adjustments
### Getting Help
* **Run Logs**: Detailed execution information
* **Team Memory**: Documented procedures and troubleshooting guides
* **Template Examples**: Reference implementations for common patterns
* **Community Resources**: Shared workflows and best practices
## Related Documentation
For deeper technical details, see:
* **[Workflow Visual Editor](workflow-visual-editor)**: Complete guide to the visual editor
* **[Media Generation](media-generation)**: AI-powered content creation workflows
* **[Team Memory](team-memory)**: Knowledge management and workflow context
* **[ClawRecipes Documentation](../clawrecipes/)**: Technical foundation and CLI tools
Workflows in ClawKitchen transform manual processes into reliable, observable automation that scales with your team's needs while maintaining human oversight and control.
# Agents and skills
Source: https://docs.clawkitchen.ai/clawrecipes/agents-and-skills
This doc explains the practical mental model behind agents, teams, tools, and skills in ClawRecipes.
***
## What is an agent?
In OpenClaw, an agent is a configured assistant with:
* a workspace
* an identity/persona
* tool permissions
* a model/runtime configuration
In ClawRecipes, an **agent recipe** scaffolds that into a folder like:
```text theme={null}
~/.openclaw/workspace-/
```
Typical files include:
* `SOUL.md`
* `AGENTS.md`
* `TOOLS.md`
***
## What is a team?
A team is a set of role agents sharing one workspace root.
Example:
```text theme={null}
~/.openclaw/workspace-development-team/
```
Inside that workspace you usually get:
* `work/` ticket lanes
* `roles/` role folders
* `shared/` artifacts
* `notes/` planning/status docs
Role agent ids usually look like:
```text theme={null}
development-team-lead
development-team-dev
development-team-test
```
***
## What is a skill?
A skill is a packaged capability.
Examples:
* Gmail / Calendar tools
* web / places integrations
* social/X tooling
* helper CLIs or packaged instructions
Skills can expose tools, configuration, scripts, or helper behavior.
***
## Tool policy: what an agent is allowed to do
Recipes can define tool policy and apply it into OpenClaw config when you scaffold with `--apply-config`.
Common patterns:
### Safe-by-default
```yaml theme={null}
tools:
profile: coding
allow: ["group:fs", "group:web"]
deny: ["exec"]
```
### Dev / devops style
```yaml theme={null}
tools:
profile: coding
allow: ["group:fs", "group:web", "group:runtime"]
deny: []
```
### About `exec`
`exec` is the shell-command tool.
If an agent needs to run commands like:
* `npm test`
* `git status`
* `pnpm build`
* `pytest`
then its runtime/tool policy must allow that capability.
***
## How to change an agent after scaffolding
There are two layers.
### 1) Workspace files
Edit the agent/team files directly:
* `SOUL.md`
* `AGENTS.md`
* `TOOLS.md`
* notes/status docs
### 2) OpenClaw config
If you need to change permissions, identity, or config-level behavior, update the OpenClaw agent config.
A common way is to re-run scaffold with `--apply-config`.
Examples:
```bash theme={null}
openclaw recipes scaffold project-manager --agent-id pm --overwrite --apply-config
openclaw recipes scaffold-team development-team --team-id development-team --overwrite --apply-config
openclaw gateway restart
```
***
## Installing skills
### Install a single skill globally
```bash theme={null}
openclaw recipes install-skill agentchat --yes
```
### Install a skill for one agent
```bash theme={null}
openclaw recipes install-skill agentchat --yes --agent-id dev
```
### Install a skill for one team
```bash theme={null}
openclaw recipes install-skill agentchat --yes --team-id development-team
```
### Install the skills declared by a recipe
```bash theme={null}
openclaw recipes install-skill development-team --yes
```
***
## Where skills get installed
By default:
* global skills → `~/.openclaw/skills/`
* agent-scoped skills → `~/.openclaw/workspace-/skills/`
* team-scoped skills → `~/.openclaw/workspace-/skills/`
***
## Removing skills
There is not currently a first-class ClawRecipes remove-skill command.
For now, remove the skill folder manually and restart the gateway.
***
## Removing a team
```bash theme={null}
openclaw recipes remove-team --team-id development-team --plan --json
openclaw recipes remove-team --team-id development-team --yes
openclaw gateway restart
```
This is safer than manually deleting everything by hand.
***
## Good practical advice
* keep high-risk tools limited to the roles that actually need them
* encode durable tool-policy changes in the recipe, not just ad hoc config edits
* use team workspaces when you want collaboration and durable ticket lanes
* use single agents when you want one specialized role without the extra team machinery
***
## Useful next reads
* [TEAM\_WORKFLOW.md](team-workflow)
* [RECIPE\_FORMAT.md](recipe-format)
* [COMMANDS.md](commands)
# Architecture
Source: https://docs.clawkitchen.ai/clawrecipes/architecture
Overview of the ClawRecipes codebase for maintainers.
## Overview
`index.ts` acts as thin CLI wiring: it registers commands via `api.registerCli` and delegates to handlers. Business logic lives in `src/handlers/` and `src/lib/`. The plugin exports `__internal` for test-only access to handlers and lib functions.
## File structure
```
ClawRecipes/
├── index.ts # Entry point: CLI wiring, delegates to handlers
├── src/
│ ├── handlers/ # One file per command group
│ │ ├── cron.ts # Cron reconciliation (used during scaffold)
│ │ ├── install.ts # install-skill, install (marketplace recipe)
│ │ ├── recipes.ts # list, show, status, bind, unbind, bindings
│ │ ├── scaffold.ts # scaffold (single agent)
│ │ ├── team.ts # scaffold-team, migrate-team, remove-team
│ │ └── tickets.ts # tickets, move-ticket, assign, take, handoff, dispatch, complete
│ └── lib/ # Shared logic
│ ├── recipes-config.ts # OpenClaw config load/write, bindings, agent snippets
│ ├── recipes.ts # Recipe listing, loading, workspace paths
│ ├── recipe-id.ts # Pick recipe id (auto-increment)
│ ├── scaffold-utils.ts # Shared scaffold logic
│ ├── ticket-workflow.ts # Ticket stages, move, assign, handoff
│ ├── ticket-finder.ts # Ticket lookup by id/number
│ ├── lanes.ts # Workflow stages (backlog, in-progress, testing, done)
│ ├── cleanup-workspaces.ts
│ ├── remove-team.ts # Team uninstall logic
│ └── ... # prompt, template, skill-install, fs-utils, etc.
├── recipes/ # Bundled recipe markdown files
├── scripts/ # Smell-check, scaffold smoke, etc.
└── tests/ # Vitest unit tests
```
## Handler-to-command map
| Handler | Commands |
| -------- | ------------------------------------------------------------------------------------ |
| recipes | list, show, status, bind, unbind, bindings |
| scaffold | scaffold |
| team | scaffold-team, migrate-team, remove-team |
| tickets | tickets, move-ticket, assign, take, handoff, dispatch, complete |
| install | install-skill (ClawHub skills), install (marketplace recipe), install-recipe (alias) |
| cron | Reconciled during scaffold (no standalone command) |
## Shared scaffold flow
Both `scaffold` and `scaffold-team` use:
* `scaffoldAgentFromRecipe` — creates workspace, writes recipe-managed files, applies agent config
* `reconcileRecipeCronJobs` — when a recipe declares `cronJobs`, installs/updates cron jobs per `cronInstallation` config
Cron behavior applies to both commands when the recipe has `cronJobs` in frontmatter.
## Data flow
```mermaid theme={null}
flowchart LR
subgraph cli [CLI]
Cmd[recipes list/show/status/...]
end
subgraph idx [index.ts]
IndexTS[registerCli]
end
subgraph handlers [Handlers]
HRecipes[recipes.ts]
HScaffold[scaffold.ts]
HTeam[team.ts]
HTickets[tickets.ts]
HInstall[install.ts]
end
subgraph lib [Lib]
LibRecipes[recipes-config]
LibScaffold[scaffold-utils]
LibTickets[ticket-workflow]
end
Cmd --> IndexTS
IndexTS --> HRecipes
IndexTS --> HScaffold
IndexTS --> HTeam
IndexTS --> HTickets
IndexTS --> HInstall
HRecipes --> LibRecipes
HScaffold --> LibScaffold
HTeam --> LibScaffold
HTickets --> LibTickets
```
## Media Drivers Subsystem
ClawRecipes implements AI media generation through a driver-based architecture:
### Architecture
```
src/lib/workflows/media-drivers/
├── types.ts # MediaDriver interface and types
├── registry.ts # Driver registration and discovery
├── utils.ts # Skill discovery and script execution
├── *.driver.ts # Provider-specific drivers
└── generic.driver.ts # Auto-discovery for unlisted skills
```
### Components
* **MediaDriver Interface**: Standardized interface for all providers (slug, mediaType, requiredEnvVars, invoke)
* **Registry System**: Maps provider names to drivers, checks env var availability
* **Skill Discovery**: Searches `~/.openclaw/skills/`, `~/.openclaw/workspace/skills/`, etc.
* **Generic Driver**: Auto-creates drivers for any installed skill not explicitly registered
### Integration Points
* **Workflow Worker**: Executes `media-image`, `media-video`, `media-audio` nodes via drivers
* **CLI Command**: `workflows media-drivers` lists available providers (used by ClawKitchen UI)
* **Environment Loading**: Merges `process.env` + `~/.openclaw/openclaw.json` env vars
### Supported Providers
* **Image**: nano-banana-pro (Gemini), openai-image-gen (DALL-E)
* **Video**: klingai (Kling AI), runway-video (Runway), luma-video (Luma AI)
* **Audio**: Extensible via generic driver pattern
## OutputFields and Schema Validation
LLM nodes support structured output generation with runtime validation:
### Configuration
```json theme={null}
{
"config": {
"outputFields": [
{"name": "title", "type": "text"},
{"name": "tags", "type": "list"},
{"name": "metadata", "type": "json"}
]
}
}
```
### Runtime Behavior
1. **Schema Generation**: outputFields converted to JSON Schema with required fields
2. **LLM Invocation**: Schema passed to `llm-task` tool for structured generation
3. **Validation**: Response validated against schema before saving
4. **Template Variables**: Structured fields become available as `{{nodeId.fieldName}}`
### Field Types
* **text**: String values
* **list**: Arrays of strings
* **json**: Nested JSON objects
### Implementation
* **Code Location**: `src/lib/workflows/workflow-worker.ts` in LLM node execution
* **Variable Extraction**: JSON fields automatically exposed as template variables
* **Error Handling**: Schema validation failures logged with detailed error messages
## Key Decisions
* **Tool policy preservation**: When a recipe omits `tools`, the scaffold preserves the existing agent's tool policy (rather than resetting it). See scaffold logic and tests.
* **`__internal` export**: Unit tests import handlers and lib helpers via `__internal`; these are not part of the public plugin API.
* **Media driver registry**: Prefers explicitly registered drivers over auto-discovery for better performance and error messages.
* **Schema validation**: OutputFields generate strict JSON schemas to ensure predictable LLM outputs for downstream template usage.
## Quality automation
* **smell-check**: `npm run smell-check` runs:
* **ESLint**: `no-explicit-any`, `complexity`, `max-lines-per-function`, `max-params` (src/; index.ts exempt from complexity/lines)
* **jscpd**: Duplicate code detection (≥8 lines, ≥50 tokens)
* **Pattern grep**: `as any` in src/ (max 10), TODO/FIXME/XXX (max 20)
* **lint**: `npm run lint` / `npm run lint:fix`
* **tests**: `npm test` (vitest), `npm run test:coverage`
* **CI**: `.github/workflows/ci.yml` runs test:coverage, smell-check, npm audit
***
If this doc is outdated, please submit a PR to update it.
# Bundled recipes
Source: https://docs.clawkitchen.ai/clawrecipes/bundled-recipes
ClawRecipes ships with bundled recipes in:
```text theme={null}
recipes/default/
```
You can browse them with:
```bash theme={null}
openclaw recipes list
openclaw recipes show development-team
```
This doc is the human-friendly guide to what each bundled recipe is for.
***
## Quick picks
If you just want a recommendation:
* want a coding team? → `development-team`
* want a marketing org? → `marketing-team`
* want a social distribution team? → `social-team`
* want a research pipeline? → `research-team`
* want a writing pipeline? → `writing-team`
* want a single coding agent? → `developer`
* want a single planning agent? → `project-manager`
***
## Single-agent recipes
### `project-manager`
Use when you want a lightweight planning/coordination agent.
```bash theme={null}
openclaw recipes scaffold project-manager --agent-id pm --apply-config
```
### `researcher`
Use when you want a single research-focused agent.
```bash theme={null}
openclaw recipes scaffold researcher --agent-id researcher --apply-config
```
### `editor`
Use when you want a single editing agent.
```bash theme={null}
openclaw recipes scaffold editor --agent-id editor --apply-config
```
### `developer`
Use when you want a single developer agent with runtime tooling.
```bash theme={null}
openclaw recipes scaffold developer --agent-id dev --apply-config
```
***
## Team recipes
### `development-team`
Use when you want a small engineering team with file-first tickets and clear role separation.
Typical scaffold:
```bash theme={null}
openclaw recipes scaffold-team development-team --team-id development-team --apply-config
```
Typical roles:
* lead
* dev
* devops
* test
n
### `marketing-team`
Use when you want a broad marketing org.
Typical roles include:
* lead
* seo
* copywriter
* ads
* social
* designer
* analyst
* video
* compliance
Scaffold:
```bash theme={null}
openclaw recipes scaffold-team marketing-team --team-id marketing-team --apply-config
```
### `social-team`
Use when you want social execution and platform-specific distribution.
Scaffold:
```bash theme={null}
openclaw recipes scaffold-team social-team --team-id social-team --apply-config
```
### `research-team`
Use when you want a citations-first research workflow.
```bash theme={null}
openclaw recipes scaffold-team research-team --team-id research-team --apply-config
```
### `writing-team`
Use when you want a writing pipeline from brief to edited draft.
```bash theme={null}
openclaw recipes scaffold-team writing-team --team-id writing-team --apply-config
```
### `customer-support-team`
Use when you want triage → resolution → KB workflow.
```bash theme={null}
openclaw recipes scaffold-team customer-support-team --team-id customer-support-team --apply-config
```
### `product-team`
Use when you want a product planning and delivery loop.
```bash theme={null}
openclaw recipes scaffold-team product-team --team-id product-team --apply-config
```
***
## Vertical / specialty team packs
ClawRecipes also ships specialty teams for specific business domains.
Examples may include:
* clinic / healthcare-oriented teams
* law-firm teams
* construction teams
* financial-planner teams
* trader teams
To browse what is currently bundled:
```bash theme={null}
openclaw recipes list
```
Then inspect the exact one you want:
```bash theme={null}
openclaw recipes show clinic-team
openclaw recipes show law-firm-team
```
***
## Workflow-related bundled recipes
### `workflow-runner-addon`
Use when you already have a team and want to add workflow-runner capability into it.
Example:
```bash theme={null}
openclaw recipes add-role \
--team-id development-team \
--role workflow-runner \
--recipe workflow-runner-addon \
--apply-config
```
### `swarm-orchestrator`
Use when you want an orchestrator-style team helper / coordination workspace.
Inspect it first:
```bash theme={null}
openclaw recipes show swarm-orchestrator
```
More:
* [SWARM\_ORCHESTRATOR.md](swarm-orchestrator)
***
## Best way to choose a recipe
1. list recipes
2. inspect the one you think you want
3. scaffold into a test team id
4. look at the generated files before going wider
Example:
```bash theme={null}
openclaw recipes list
openclaw recipes show development-team
openclaw recipes scaffold-team development-team --team-id dev-sandbox-team --apply-config
```
# ClawKitchen and ClawRecipes
Source: https://docs.clawkitchen.ai/clawrecipes/clawcipes-kitchen
ClawKitchen is the UI companion for ClawRecipes.
Use this doc if you want to understand the relationship between the two.
***
## Short version
* **ClawRecipes** = the plugin, commands, file-first workspaces, workflows, ticket flow
* **ClawKitchen** = the UI on top
You do **not** need ClawKitchen to use ClawRecipes.
You **can** use ClawKitchen to make ClawRecipes easier to manage.
***
## What ClawKitchen is good at
ClawKitchen is useful for:
* browsing teams and roles
* managing scaffolded teams
* seeing ticket lanes visually
* viewing workflow activity
* reviewing approvals
* guiding setup with a UI instead of raw files/CLI
***
## What still lives in ClawRecipes
Even if you use ClawKitchen, the source of truth is still mostly file-first.
ClawRecipes owns:
* recipe scaffolding
* workspace layout
* ticket files
* workflow files
* workflow run artifacts
* CLI commands
ClawKitchen is the management layer, not a replacement for the plugin.
***
## Workflow note
Workflows depend on ClawRecipes features being present and, for some setups, on optional plugin/tooling being enabled after install.
Examples:
* LLM nodes may require the built-in `llm-task` plugin to be enabled
* publish/posting behavior may require outbound posting config or a local patch
So when a user says "I installed everything, why doesn't the workflow fully work?" the answer is often:
* the plugin is installed
* but an optional workflow dependency still needs to be enabled/configured
***
## Good mental model
Think of it like this:
* ClawRecipes builds and runs the machine
* ClawKitchen gives you the dashboard
Both matter.
But if you are debugging behavior, always confirm the underlying ClawRecipes files/commands first.
# ClawRecipes command reference
Source: https://docs.clawkitchen.ai/clawrecipes/commands
All commands are under:
```bash theme={null}
openclaw recipes
```
This page is organized by the jobs humans actually need to do.
***
## 1) Browse recipes
### List all recipes
```bash theme={null}
openclaw recipes list
```
### Show one recipe
```bash theme={null}
openclaw recipes show development-team
```
### Check recipe status / missing skills
```bash theme={null}
openclaw recipes status
openclaw recipes status development-team
```
***
## 2) Install recipes and skills
### Install a marketplace recipe into your workspace
```bash theme={null}
openclaw recipes install development-team
openclaw recipes install clinic-team --overwrite
```
Optional:
* `--registry-base `
* `--overwrite`
Alias:
```bash theme={null}
openclaw recipes install-recipe development-team
```
### Install a skill from ClawHub
```bash theme={null}
# global
openclaw recipes install-skill agentchat --yes
# scoped to one agent
openclaw recipes install-skill agentchat --yes --agent-id dev
# scoped to one team
openclaw recipes install-skill agentchat --yes --team-id development-team
```
Options:
* `--yes`
* `--global`
* `--agent-id `
* `--team-id `
***
## 3) Scaffold agents and teams
### Scaffold a single agent
```bash theme={null}
openclaw recipes scaffold project-manager \
--agent-id pm \
--name "Project Manager" \
--apply-config
```
Useful options:
* `--agent-id `
* `--name `
* `--recipe-id `
* `--auto-increment`
* `--overwrite-recipe`
* `--overwrite`
* `--apply-config`
What it writes:
* `~/.openclaw/workspace-/...`
* workspace recipe file under `~/.openclaw/workspace/recipes/`
### Scaffold a team
```bash theme={null}
openclaw recipes scaffold-team development-team \
--team-id development-team \
--apply-config \
--overwrite
```
Useful options:
* `--team-id `
* `--recipe-id `
* `--auto-increment`
* `--overwrite-recipe`
* `--overwrite`
* `--apply-config`
What it writes:
* `~/.openclaw/workspace-/...`
* role folders under `roles/`
* ticket lanes under `work/`
* workspace recipe file under `~/.openclaw/workspace/recipes/`
### Add a role to an existing team
```bash theme={null}
openclaw recipes add-role \
--team-id development-team \
--role workflow-runner \
--recipe workflow-runner-addon \
--apply-config
```
Useful options:
* `--team-id `
* `--role `
* `--recipe `
* `--agent-id `
* `--apply-config`
* `--overwrite`
* `--no-cron`
***
## 4) Work the file-first ticket flow
The normal lane flow is:
```text theme={null}
backlog → in-progress → testing → done
```
### Turn a request into a ticket
```bash theme={null}
openclaw recipes dispatch \
--team-id development-team \
--owner lead \
--request "Add a customer-support team recipe"
```
Options:
* `--team-id `
* `--request `
* `--owner dev|devops|lead|test`
* `--yes`
### List tickets
```bash theme={null}
openclaw recipes tickets --team-id development-team
openclaw recipes tickets --team-id development-team --json
```
### Move a ticket between lanes
```bash theme={null}
openclaw recipes move-ticket --team-id development-team --ticket 0007 --to in-progress
openclaw recipes move-ticket --team-id development-team --ticket 0007 --to testing
openclaw recipes move-ticket --team-id development-team --ticket 0007 --to done --completed
```
Options:
* `--team-id `
* `--ticket `
* `--to backlog|in-progress|testing|done`
* `--completed`
* `--yes`
### Assign a ticket
```bash theme={null}
openclaw recipes assign --team-id development-team --ticket 0007 --owner dev
openclaw recipes assign --team-id development-team --ticket 0007 --owner lead
```
Options:
* `--team-id `
* `--ticket `
* `--owner dev|devops|lead|test`
* `--overwrite`
* `--yes`
### Take a ticket
Shortcut for assign + move to in-progress.
```bash theme={null}
openclaw recipes take --team-id development-team --ticket 0007 --owner dev
```
### Handoff to testing
```bash theme={null}
openclaw recipes handoff --team-id development-team --ticket 0007
openclaw recipes handoff --team-id development-team --ticket 0007 --tester test
```
### Complete a ticket
```bash theme={null}
openclaw recipes complete --team-id development-team --ticket 0007
```
### Clean up stale assignment stubs for done work
```bash theme={null}
openclaw recipes cleanup-closed-assignments --team-id development-team
openclaw recipes cleanup-closed-assignments --team-id development-team --ticket 0050 0064
```
***
## 5) Workflows
Use these when you are running file-first workflows from `shared-context/workflows/`.
### See workflow command help
```bash theme={null}
openclaw recipes workflows --help
```
### Run one workflow manually
```bash theme={null}
openclaw recipes workflows run \
--team-id development-team \
--workflow-file marketing.workflow.json
```
### Runner commands
```bash theme={null}
openclaw recipes workflows runner-once --team-id development-team
openclaw recipes workflows runner-tick \
--team-id development-team \
--concurrency 2 \
--lease-seconds 120
```
### Worker commands
```bash theme={null}
openclaw recipes workflows worker-tick \
--team-id development-team \
--agent-id development-team-lead \
--limit 10
```
### Media driver commands
List registered media generation drivers (and whether required API keys are present):
```bash theme={null}
openclaw recipes workflows media-drivers
```
This is what ClawKitchen uses to populate the media provider dropdown.
More: [MEDIA\_DRIVERS.md](media-drivers)
### Approval commands
```bash theme={null}
openclaw recipes workflows approve \
--team-id development-team \
--run-id \
--approved true
openclaw recipes workflows approve \
--team-id development-team \
--run-id \
--approved false \
--note "Rewrite the hook"
openclaw recipes workflows resume \
--team-id development-team \
--run-id
openclaw recipes workflows poll-approvals \
--team-id development-team \
--limit 20
```
### Important workflow note
After installing ClawRecipes, workflows may still need optional pieces turned on.
Examples:
* LLM workflows may require the built-in `llm-task` plugin to be enabled
* publishing workflows may require `outbound.post` config or a local posting patch to be reapplied
So if you install the plugin and then say "the workflow exists but does not fully work," check the optional workflow dependencies next.
More:
* [WORKFLOW\_RUNS\_FILE\_FIRST.md](workflow-runs-file-first) — node kinds, triggers, runs, edges, runner/worker model, approvals
* [WORKFLOW\_EXAMPLES.md](workflow-examples) — copy-paste workflow patterns
* [OUTBOUND\_POSTING.md](outbound-posting) — publishing/posting behavior and setup
***
## 6) Bindings
Bindings route messages/traffic to the right agent.
### Show bindings
```bash theme={null}
openclaw recipes bindings
```
### Add a binding
```bash theme={null}
openclaw recipes bind \
--agent-id dev \
--channel telegram \
--peer-kind dm \
--peer-id 6477250615
```
### Remove a binding
```bash theme={null}
openclaw recipes unbind \
--agent-id dev \
--channel telegram \
--peer-kind dm \
--peer-id 6477250615
```
***
## 7) Migrate / remove / clean up
### Migrate a legacy team layout
```bash theme={null}
openclaw recipes migrate-team --team-id development-team --dry-run
openclaw recipes migrate-team --team-id development-team --mode move
```
### Remove a team safely
```bash theme={null}
openclaw recipes remove-team --team-id development-team --plan --json
openclaw recipes remove-team --team-id development-team --yes
```
### Clean up temporary workspaces
```bash theme={null}
# dry-run
openclaw recipes cleanup-workspaces
# delete allowed temp prefixes
openclaw recipes cleanup-workspaces --prefix smoke- --prefix qa- --yes
# json output
openclaw recipes cleanup-workspaces --json
```
***
## Fastest useful command set
If you only want the high-value commands:
```bash theme={null}
openclaw recipes list
openclaw recipes scaffold-team development-team --team-id development-team --apply-config
openclaw recipes dispatch --team-id development-team --owner lead --request "Do a thing"
openclaw recipes tickets --team-id development-team
openclaw recipes take --team-id development-team --ticket 0001 --owner dev
openclaw recipes handoff --team-id development-team --ticket 0001
openclaw recipes complete --team-id development-team --ticket 0001
```
# ClawRecipes
Source: https://docs.clawkitchen.ai/clawrecipes/index
ClawRecipes turns repeatable agent setups into reusable recipes so teams can scaffold systems, not rebuild them from scratch every time.
## What ClawRecipes is
ClawRecipes is the OpenClaw plugin for turning repeatable agent setups into reusable, installable recipes.
Instead of rebuilding the same agent, team, workflow, folder structure, and operating rules over and over, ClawRecipes lets you package that work once and scaffold it again on demand.
## Why it exists
Most people experimenting with agents hit the same wall fast:
* one useful setup turns into five hand-maintained copies
* team structures live only in chat or memory
* workflows are hard to repeat consistently
* the “right way” to run a project becomes tribal knowledge
ClawRecipes exists to fix that.
It gives you a file-first way to capture how a team or agent system should be built, so you can recreate it cleanly, share it, improve it, and run it again without starting from zero.
## What the project is trying to do
ClawRecipes is about making agent systems:
* **repeatable** — scaffold the same structure reliably
* **shareable** — package working setups as recipes
* **understandable** — keep the system readable in files, not hidden in magic
* **operational** — include workflows, roles, memory rules, and team conventions
That means a recipe can define more than a prompt. It can define how a whole team works.
## What you can build with it
With ClawRecipes, you can scaffold things like:
* a single specialized agent
* a development team with lead/dev/test roles
* a marketing team with repeatable workflows
* a workflow-runner add-on
* a bundled specialty pack for a specific use case or industry
## How it relates to ClawKitchen
ClawRecipes is the system that defines and scaffolds the recipes.
ClawKitchen is the UI layer that helps people browse, install, inspect, and operate those systems.
A simple way to think about it:
* **ClawRecipes** = the recipe and scaffolding engine
* **ClawKitchen** = the control surface and product experience around it
## In this section
This section covers the core parts of ClawRecipes:
* installation and verification
* commands and daily usage
* recipe format and architecture
* team workflow and file-first workflow runs
* memory and shared-context conventions
* bundled recipes and related integrations
# Installation
Source: https://docs.clawkitchen.ai/clawrecipes/installation
This repo is an **OpenClaw plugin**. After install, its commands show up under:
```bash theme={null}
openclaw recipes ...
```
This guide is for humans who want a clean install and a quick way to verify it actually works.
***
## Before you start
Make sure these work first:
```bash theme={null}
openclaw --version
openclaw plugins list
```
You should also know which install path you want:
* **npm install** — best for normal users
* **linked local checkout** — best for development or rapid iteration
***
## Option A — install from npm
```bash theme={null}
openclaw plugins install @jiggai/recipes
openclaw gateway restart
openclaw plugins list
```
Then confirm the plugin is loaded:
```bash theme={null}
openclaw recipes list
```
### If you use a plugin allowlist
If your OpenClaw config uses `plugins.allow`, you may need to explicitly allow `recipes`.
Inspect first:
```bash theme={null}
openclaw config get plugins.allow --json
```
If needed, update it and restart:
```bash theme={null}
openclaw config set plugins.allow --json '["memory-core","telegram","recipes"]'
openclaw gateway restart
```
***
## Option B — install from a local checkout
```bash theme={null}
git clone https://github.com/JIGGAI/ClawRecipes.git ~/ClawRecipes
openclaw plugins install --link ~/ClawRecipes
openclaw gateway restart
openclaw plugins list
```
Verify:
```bash theme={null}
openclaw recipes list
```
***
## Option C — update an existing linked checkout
If you already have a linked local repo:
```bash theme={null}
cd ~/ClawRecipes
git pull
openclaw gateway restart
```
***
## First commands to run after install
These are the fastest sanity checks:
```bash theme={null}
openclaw recipes list
openclaw recipes show development-team
openclaw recipes status development-team
```
Then scaffold something small:
```bash theme={null}
openclaw recipes scaffold project-manager --agent-id pm --apply-config
```
Or scaffold a team:
```bash theme={null}
openclaw recipes scaffold-team development-team \
--team-id development-team \
--apply-config
```
***
## Important workflow note after install
Installing ClawRecipes does **not** automatically mean workflow posting side effects are turned on.
### What is available after a normal install
After install, you have:
* workflow runner commands
* workflow files on disk
* approval flow support
* file-first run storage
### What may still require extra setup
If you want workflows to **publish** content externally:
* you should configure the supported `outbound.post` path, or
* if you rely on a controller-local custom patch, you must reapply that patch after install/update
### Plain-English warning
If you have a workflow that should post to X or another external destination, do **not** assume it will post just because the plugin installed successfully.
After install/update, either:
1. configure the supported outbound posting service, or
2. tell your assistant to turn workflow posting back on / reapply your local patch
See:
* [WORKFLOW\_RUNS\_FILE\_FIRST.md](workflow-runs-file-first)
* [OUTBOUND\_POSTING.md](outbound-posting)
***
## Uninstall
```bash theme={null}
openclaw plugins uninstall recipes
openclaw gateway restart
```
***
## Troubleshooting
### `openclaw recipes ...` commands are missing
Try:
```bash theme={null}
openclaw plugins list
openclaw gateway restart
openclaw recipes list
```
### Plugin installed but did not load
Check:
* the plugin appears in `openclaw plugins list`
* your allowlist is not blocking `recipes`
* you restarted the gateway after install
### Workflow commands exist, but posting is still off
That is possible and expected.
Check whether you are using:
* the supported `outbound.post` service path, or
* a local custom patch that needs to be reapplied after install/update
### `install-skill` fails
This command uses ClawHub.
Try:
```bash theme={null}
npx clawhub@latest --help
```
If needed:
```bash theme={null}
npx clawhub@latest login
```
***
## Quick reference
```bash theme={null}
# install
openclaw plugins install @jiggai/recipes
openclaw gateway restart
# verify
openclaw recipes list
# scaffold an agent
openclaw recipes scaffold project-manager --agent-id pm --apply-config
# scaffold a team
openclaw recipes scaffold-team development-team --team-id development-team --apply-config
```
# Media Drivers (ClawRecipes)
Source: https://docs.clawkitchen.ai/clawrecipes/media-drivers
ClawRecipes implements media generation via a **driver architecture**. Drivers are used by the workflow worker when executing `media-image`, `media-video`, and `media-audio` nodes.
This doc is for developers adding new providers.
## Key Concepts
* A **skill** is a folder on disk (usually installed from ClawHub) that contains scripts and docs.
* A **driver** is a small TypeScript adapter that knows how to invoke a given skill reliably.
* Drivers provide:
* Stable display name and slug
* Required env-var list (availability checks)
* Invocation details (stdin vs CLI args, scripts/ subdir, venv detection)
## CLI: List drivers
ClawKitchen uses this command to populate its provider dropdown:
```bash theme={null}
openclaw recipes workflows media-drivers
```
It returns JSON like:
```json theme={null}
[
{
"slug": "nano-banana-pro",
"displayName": "Nano Banana Pro (Gemini Image Generation)",
"mediaType": "image",
"requiredEnvVars": ["GEMINI_API_KEY"],
"available": true,
"missingEnvVars": []
}
]
```
Availability is computed from **merged env**:
* `process.env` (ClawRecipes process)
* `~/.openclaw/openclaw.json` → `env.vars`
## Where the code lives
```
src/lib/workflows/media-drivers/
types.ts
registry.ts
utils.ts
nano-banana-pro.driver.ts
openai-image-gen.driver.ts
runway-video.driver.ts
kling-video.driver.ts
luma-video.driver.ts
generic.driver.ts
```
## MediaDriver interface
```ts theme={null}
export interface MediaDriver {
slug: string; // Skill folder name
mediaType: 'image' | 'video' | 'audio';
displayName: string; // UI dropdown label
requiredEnvVars: string[]; // Availability check
invoke(opts: MediaDriverInvokeOpts): Promise;
}
```
The `invoke()` method should:
* Write output into `opts.outputDir`
* Return `{ filePath }` pointing at the generated file
* Throw on failure with a useful error message (stderr/stdout included when possible)
## Adding a new driver
### 1) Add or install the underlying skill
A skill should live in one of:
* `~/.openclaw/skills/`
* `~/.openclaw/workspace/skills/`
* `~/.openclaw/workspace/` (ClawHub sometimes installs here)
The worker and driver utils search these roots via `findSkillDir(slug)`.
### 2) Create the driver file
Create:
```
src/lib/workflows/media-drivers/my-provider.driver.ts
```
Example pattern (stdin → `MEDIA:` output):
```ts theme={null}
import * as path from 'path';
import { MediaDriver, MediaDriverInvokeOpts, MediaDriverResult } from './types';
import { findSkillDir, findVenvPython, runScript, parseMediaOutput } from './utils';
export class MyProvider implements MediaDriver {
slug = 'my-provider';
mediaType = 'image' as const;
displayName = 'My Provider';
requiredEnvVars = ['MY_PROVIDER_API_KEY'];
async invoke(opts: MediaDriverInvokeOpts): Promise {
const { prompt, outputDir, env, timeout } = opts;
const skillDir = await findSkillDir(this.slug);
if (!skillDir) throw new Error(`Skill dir not found for ${this.slug}`);
const scriptPath = path.join(skillDir, 'generate_image.py');
const runner = await findVenvPython(skillDir);
const stdout = runScript({
runner,
script: scriptPath,
stdin: prompt,
env: { ...env, HOME: process.env.HOME || '/home/control' },
cwd: outputDir,
timeout,
});
const filePath = parseMediaOutput(stdout);
if (!filePath) throw new Error(`No MEDIA: path in output: ${stdout}`);
return { filePath };
}
}
```
Example pattern (CLI args → script prints direct path):
* See `nano-banana-pro.driver.ts`.
### 3) Register it
Add the driver to `registry.ts` in `knownDrivers`:
```ts theme={null}
import { MyProvider } from './my-provider.driver';
const knownDrivers: MediaDriver[] = [
// ...
new MyProvider(),
];
```
### 4) Done
* The workflow worker can now invoke it by setting `provider` to `skill-my-provider`.
* The CLI `workflows media-drivers` will list it.
* ClawKitchen will show it automatically (Kitchen pulls the list from the CLI).
## Script contract (skills)
Drivers can invoke scripts in different ways, but the recommended contract is:
* Prompt via stdin
* Print `MEDIA:/absolute/or/relative/path` to stdout
* Write the file into `MEDIA_OUTPUT_DIR` if provided
Notes:
* Some ClawHub skills place scripts under `scripts/`. Use `findScriptInSkill()` or direct paths accordingly.
* Venv support: worker/driver utils will prefer `.venv/bin/python` when present.
## Troubleshooting
* If the dropdown says a driver is unavailable, run:
```bash theme={null}
openclaw recipes workflows media-drivers
```
and check `missingEnvVars`.
* If a skill isn't found, verify the folder name matches `slug` and is inside a scanned root.
# Media Generation
Source: https://docs.clawkitchen.ai/clawrecipes/media-generation
ClawRecipes supports AI-powered image, video, and audio generation through a driver-based architecture. This runtime-focused guide covers setup, configuration, and troubleshooting.
## Architecture Overview
### Driver Registry System
ClawRecipes uses a **driver registry** that maps providers to skill scripts:
```
Provider Name → MediaDriver → Skill Script → Generated Media
```
**Key Components:**
* **MediaDriver** — TypeScript adapter with provider-specific logic
* **Skill** — Folder containing scripts, dependencies, and documentation
* **Registry** — Maps provider names to drivers for runtime lookup
* **Worker** — Executes media nodes using appropriate drivers
### Execution Flow
1. **Workflow node** specifies provider (e.g., `"provider": "nano-banana-pro"`)
2. **Worker** looks up driver in registry by slug
3. **Driver** locates skill directory and script
4. **Script** executes with prompt and config
5. **Output file** saved to workflow run media directory
## Setup Instructions
### Image Generation
#### Nano Banana Pro (Gemini)
**Requirements:**
* GEMINI\_API\_KEY environment variable
* ClawHub skill: `nano-banana-pro`
**Setup:**
```bash theme={null}
# Install skill
clawhub install nano-banana-pro
# Set API key in OpenClaw config
openclaw gateway config update env.vars.GEMINI_API_KEY "your-gemini-api-key"
```
**Configuration:**
```json theme={null}
{
"kind": "media-image",
"config": {
"provider": "nano-banana-pro",
"size": "2048x2048",
"promptTemplate": "{{content_draft.title}}: professional product photo"
}
}
```
**Supported sizes:**
* `1024x1024` → 1K resolution
* `1792x1792` → 2K resolution
* `3840x3840` → 4K resolution
#### DALL-E (OpenAI)
**Requirements:**
* OPENAI\_API\_KEY environment variable
* ClawHub skill: `openai-dalle`
**Setup:**
```bash theme={null}
clawhub install openai-dalle
openclaw gateway config update env.vars.OPENAI_API_KEY "sk-your-openai-key"
```
**Configuration:**
```json theme={null}
{
"config": {
"provider": "openai-dalle",
"size": "1024x1024",
"quality": "hd",
"style": "natural"
}
}
```
**Supported options:**
* **size:** `1024x1024`, `1024x1792`, `1792x1024`
* **quality:** `standard`, `hd`
* **style:** `natural`, `vivid`
### Video Generation
#### Kling AI
**Requirements:**
* Kling AI credentials file (NOT environment variables)
* ClawHub skill: `klingai`
**Setup:**
```bash theme={null}
# Install skill
clawhub install klingai --force
# Configure credentials
mkdir -p ~/.config/kling
cat > ~/.config/kling/.credentials << EOF
{
"access_key_id": "your-access-key",
"secret_access_key": "your-secret-key"
}
EOF
```
**Configuration:**
```json theme={null}
{
"kind": "media-video",
"config": {
"provider": "klingai",
"duration": "10",
"aspect_ratio": "16:9",
"promptTemplate": "{{content_brief.style}}: {{content_brief.video_description}}"
}
}
```
**Constraints:**
* **Duration:** 3-15 seconds
* **Aspect ratios:** `16:9`, `9:16`, `1:1`
* **Mode:** pro (fixed)
#### Runway
**Requirements:**
* RUNWAYML\_API\_SECRET environment variable
* ClawHub skill: `runway-video`
**Setup:**
```bash theme={null}
clawhub install runway-video
openclaw gateway config update env.vars.RUNWAYML_API_SECRET "your-runway-secret"
```
**Configuration:**
```json theme={null}
{
"config": {
"provider": "runway-video",
"duration": "8",
"size": "1280x768",
"addRefinement": "true"
}
}
```
#### Luma AI
**Requirements:**
* LUMAAI\_API\_KEY environment variable
* ClawHub skill: `luma-video`
**Setup:**
```bash theme={null}
clawhub install luma-video
openclaw gateway config update env.vars.LUMAAI_API_KEY "luma-your-api-key"
```
**Configuration:**
```json theme={null}
{
"config": {
"provider": "luma-video",
"duration": "5",
"aspect_ratio": "16:9"
}
}
```
## Configuration Fields
### Core Fields
**promptTemplate** — Template string with variable substitution
```json theme={null}
"promptTemplate": "Create {{media_type}} for: {{content_draft.title}}\nStyle: {{brand_guide.style}}"
```
**provider** — Driver slug (matches skill folder name)
```json theme={null}
"provider": "nano-banana-pro"
```
**outputPath** — Custom output file path (optional)
```json theme={null}
"outputPath": "media/{{run.id}}/hero-{{content_draft.slug}}.png"
```
### Size Configuration
**For Images:**
```json theme={null}
"size": "1024x1024"
"size": "1792x1792"
"size": "3840x3840"
```
**For Videos:**
```json theme={null}
"aspect_ratio": "16:9"
"aspect_ratio": "9:16"
"aspect_ratio": "1:1"
"size": "1280x768"
```
### Duration Configuration (Videos)
```json theme={null}
"duration": "5" // seconds as string
"duration": "10" // clamp to provider limits
```
**Provider Constraints:**
* **Kling AI:** 3-15 seconds
* **Runway:** 1-10 seconds
* **Luma AI:** 2-10 seconds
### Prompt Refinement
**addRefinement** — Enable LLM prompt enhancement (opt-in)
```json theme={null}
"addRefinement": "true"
```
**When enabled:**
1. Input prompt processed by LLM for enhancement
2. Enhanced prompt sent to media provider
3. Results in more detailed, production-ready prompts
**Default:** `false` (upstream LLM nodes should produce ready prompts)
## Environment Variables
### Loading Hierarchy
ClawRecipes loads environment variables from:
1. **Process environment** — `process.env` (highest priority)
2. **OpenClaw config** — `~/.openclaw/openclaw.json` → `env.vars`
### OpenClaw Config Format
**Modern format:** (recommended)
```json theme={null}
{
"env": {
"vars": {
"GEMINI_API_KEY": "your-key",
"OPENAI_API_KEY": "your-key",
"RUNWAYML_API_SECRET": "your-secret"
}
}
}
```
**Legacy format:** (still supported)
```json theme={null}
{
"env": {
"GEMINI_API_KEY": "your-key"
}
}
```
### Setting Environment Variables
```bash theme={null}
# Via OpenClaw CLI
openclaw gateway config update env.vars.GEMINI_API_KEY "your-key"
# Via direct edit
$EDITOR ~/.openclaw/openclaw.json
# Via shell environment
export GEMINI_API_KEY="your-key"
openclaw gateway restart
```
## Skill Installation
### ClawHub Installation
```bash theme={null}
# Global installation (recommended)
clawhub install nano-banana-pro
clawhub install klingai --force
# Agent-specific installation
openclaw recipes install-skill nano-banana-pro --agent-id marketing-lead
# Team-specific installation
openclaw recipes install-skill nano-banana-pro --team-id marketing-team
```
### Installation Roots
Skills are discovered from these directories:
* `~/.openclaw/skills/` — Global shared skills
* `~/.openclaw/workspace/skills/` — Workspace-local skills
* `~/.openclaw/workspace/` — ClawHub sometimes installs here
### Verification
```bash theme={null}
# List available drivers
openclaw recipes workflows media-drivers
# Expected output:
[
{
"slug": "nano-banana-pro",
"displayName": "Nano Banana Pro (Gemini Image Generation)",
"mediaType": "image",
"requiredEnvVars": ["GEMINI_API_KEY"],
"available": true,
"missingEnvVars": []
}
]
```
## Template Variables
Media nodes support full template variable substitution in:
* **promptTemplate** — AI generation prompt
* **outputPath** — Custom file paths
### Available Variables
**Global variables:**
```
{{date}} — Current timestamp
{{run.id}} — Workflow run ID
{{workflow.name}} — Workflow display name
{{node.id}} — Current node ID
```
**Upstream node outputs:**
```
{{content_draft.text}} — Text from LLM node
{{brand_guide.style}} — Extracted JSON field
{{research_brief.video_concept}} — Nested field extraction
```
### Example Templates
**Product marketing image:**
```json theme={null}
{
"promptTemplate": "Professional product photo: {{product_brief.name}}\n\nStyle: {{brand_guide.visual_style}}\nMood: {{campaign_goals.target_emotion}}\nComposition: {{art_direction.composition_notes}}"
}
```
**Social video:**
```json theme={null}
{
"promptTemplate": "Short social media video: {{content_calendar.post_topic}}\n\nHook: {{copywriting.video_hook}}\nVisual style: {{brand_assets.video_style}}\nDuration: energetic {{duration}}s clip"
}
```
## Troubleshooting
### Driver Not Found
**Error:**
```
No media driver found for provider "nano-banana-pro"
```
**Diagnosis:**
```bash theme={null}
# Check if skill is installed
ls ~/.openclaw/skills/nano-banana-pro
ls ~/.openclaw/workspace/skills/nano-banana-pro
# Verify driver registry
openclaw recipes workflows media-drivers | grep nano-banana-pro
```
**Solutions:**
1. Install missing skill: `clawhub install nano-banana-pro`
2. Check skill directory permissions
3. Restart gateway if skill was just installed
### Missing Environment Variables
**Error:**
```json theme={null}
{
"slug": "nano-banana-pro",
"available": false,
"missingEnvVars": ["GEMINI_API_KEY"]
}
```
**Diagnosis:**
```bash theme={null}
# Check current environment
echo $GEMINI_API_KEY
# Check OpenClaw config
cat ~/.openclaw/openclaw.json | jq '.env.vars'
```
**Solutions:**
1. Set via config: `openclaw gateway config update env.vars.GEMINI_API_KEY "your-key"`
2. Export in shell before starting gateway
3. Restart gateway after config changes
### Script Execution Failures
**Error:**
```
Script execution failed: nano-banana-pro generate_image.py
--- stderr ---
ModuleNotFoundError: No module named 'google.generativeai'
```
**Diagnosis:**
```bash theme={null}
# Check skill venv
ls ~/.openclaw/skills/nano-banana-pro/.venv/
# Test script manually
cd ~/.openclaw/skills/nano-banana-pro
./.venv/bin/python scripts/generate_image.py --help
```
**Solutions:**
1. Reinstall skill: `clawhub install nano-banana-pro --force`
2. Manually setup venv: `cd skill && python -m venv .venv && .venv/bin/pip install -r requirements.txt`
3. Check skill documentation for dependencies
### Prompt Too Long
**Error:**
```
400 Bad Request: prompt exceeds maximum length (4000 characters)
```
**Solutions:**
1. **Enable refinement:** `"addRefinement": "true"` — let LLM condense the prompt
2. **Shorten templates:** Remove verbose instructions from prompt template
3. **Upstream editing:** Have prior LLM nodes produce concise briefs
### Output Path Issues
**Error:**
```
fs.write path must be within the team workspace
```
**Solutions:**
1. Use relative paths: `"outputPath": "media/{{node.id}}.png"`
2. Don't include `../` in paths
3. Paths are resolved relative to workflow run directory
### Permission Errors
**Error:**
```
EACCES: permission denied, open '/home/control/.openclaw/skills/nano-banana-pro'
```
**Solutions:**
1. Fix ownership: `sudo chown -R control:control ~/.openclaw/`
2. Check directory permissions: `chmod 755 ~/.openclaw/skills/`
3. Reinstall skill if corrupted
### Timeout Issues
**Error:**
```
Script execution timeout (300000ms)
```
**Solutions:**
1. **Increase timeout:** Add `"timeoutMs": 600000` to node config
2. **Check API status:** Verify provider service availability
3. **Reduce complexity:** Simplify prompts for faster generation
## Advanced Configuration
### Custom Output Directories
```json theme={null}
{
"config": {
"outputPath": "assets/{{workflow.name}}/{{run.id}}/hero.png"
}
}
```
Creates: `workspace-team/assets/Content Pipeline/2025-04-04T03-53-00-123Z/hero.png`
### Model Selection (Provider-Specific)
Some drivers support model selection:
```json theme={null}
{
"config": {
"provider": "openai-dalle",
"model": "dall-e-3",
"quality": "hd"
}
}
```
### Provider Fallbacks
Use LLM nodes to implement fallback logic:
```json theme={null}
{
"action": {
"promptTemplate": "Generate an image using primary provider: {{image_config.primary_provider}}\n\nIf unavailable, fallback to: {{image_config.fallback_provider}}"
}
}
```
## Related Documentation
* [MEDIA\_DRIVERS.md](media-drivers) — Developer guide for adding new providers
* [TEMPLATE\_VARIABLES.md](template-variables) — Template variable syntax and examples
* [WORKFLOW\_NODES.md](workflow-nodes) — Complete node configuration reference
* [INSTALLATION.md](installation) — Installing ClawRecipes and dependencies
## Implementation Details
**Core Code Locations:**
* `src/lib/workflows/media-drivers/` — Driver implementations
* `src/lib/workflows/workflow-worker.ts` — Media node execution
* `src/handlers/media-drivers.ts` — CLI media-drivers command
**Driver Interface:**
* `MediaDriver` — TypeScript interface for all providers
* `MediaDriverInvokeOpts` — Standardized invocation parameters
* `MediaDriverResult` — Standardized return format
**Registry System:**
* Known drivers registered in `registry.ts`
* Generic driver auto-discovery for unlisted skills
* Runtime environment variable availability checking
# Memory Model (Assistant vs Team vs Role)
Source: https://docs.clawkitchen.ai/clawrecipes/memory-model
This project uses a **file-first** memory model with clear boundaries so we get: - continuity where it’s safe (assistant-local) - shared coordination where it’s needed (team worksp
The system has **4 layers**:
1. **Assistant continuity memory (private, single assistant)**
2. **Team coordination docs (shared, operational)**
3. **Team knowledge memory (shared, durable knowledge base)**
4. **Role memory (scoped to a role inside a team)**
***
## 1) Assistant continuity memory (private)
**What it is:**
Long-term continuity for a *single* assistant persona (preferences, long-running projects, etc.).
**Where it lives (example):**
* `~/.openclaw/workspace/` (the assistant’s own workspace)
* `SOUL.md` / `USER.md` (persona + user preferences)
* `memory/YYYY-MM-DD.md` (daily journal)
* `MEMORY.md` (curated long-term memory)
**Visibility / ownership:**
* **Private** to that assistant.
* Must **not** be copied into team workspaces or role folders.
**Guideline:**
Use this for the assistant’s own continuity only. Never treat it as team knowledge.
***
## 2) Team coordination docs (shared, operational)
**What it is:**
The team’s shared operating system: tickets, plans, status logs, checklists. This is how teams coordinate.
**Where it lives (example team workspace):**
* `/`
* `work/` (ticket board: backlog/in-progress/testing/done)
* `notes/plan.md` (current plan)
* `notes/status.md` (append-only status log)
* `TICKETS.md`, `AGENTS.md` (team conventions + guardrails)
**Visibility / ownership:**
* Shared with everyone working in that team workspace.
* Should contain **work facts** and decisions.
* Avoid sensitive assistant/user-specific content.
**Guideline:**
If it’s about *what we’re doing* (tasks, decisions, progress), it belongs here.
***
## 3) Team knowledge memory (shared, durable)
**What it is:**
A shared knowledge base for the team: facts, discoveries, “known good” answers, references.
**Where it lives (example):**
* `/shared-context/memory/`
* `team.jsonl` (append-only memory items)
* `pinned.jsonl` (high-signal, curated pins)
* Optional: `PINNED.md` (rendered/derived view for humans)
**Visibility / ownership:**
* Shared within the team.
* Treated as **team-owned knowledge**, not assistant-owned.
**Guideline:**
If it’s something we want *any team member/agent* to know later, it belongs here.
***
## 4) Role memory (scoped to a role)
**What it is:**
Memory that belongs to a *role* within a team (e.g., “dev”, “qa”, “lead”). This helps role agents keep continuity without mixing concerns.
**Where it lives (example):**
* `/roles//`
* `memory/YYYY-MM-DD.md` (role daily log)
* `MEMORY.md` (role curated memory)
**Visibility / ownership:**
* Shared within the team workspace, but conceptually **owned by that role**.
* Should not contain assistant-private continuity memory.
**Guideline:**
If it’s specific to how that role operates, what it learned, or role-specific context, put it here.
***
## Quick “What goes where?”
* **Private assistant preferences / personal user context** → Assistant continuity memory (Layer 1)
* **Ticket status, blockers, decisions, progress updates** → Team coordination docs (Layer 2)
* **Reusable facts, runbooks, known fixes, canonical links** → Team knowledge memory (Layer 3)
* **Role-specific learnings / role playbooks / role continuity** → Role memory (Layer 4)
***
## Linking (canonical doc)
This file is intended to be the **canonical** memory model doc.
UI and scaffolds should **link here** rather than duplicating content:
* Kitchen UI: Team Editor → Memory tab should link to this doc.
* Team scaffolds: include a short pointer (link-out) rather than copying this whole page.
***
## Security / leakage guardrails
* Never paste assistant private continuity files (Layer 1) into team or role memory.
* Prefer links to canonical docs over copy/paste.
* Treat `notes/status.md` as append-only operational history (not a knowledge base).
# Memory System
Source: https://docs.clawkitchen.ai/clawrecipes/memory-system
This document explains the ClawRecipes memory system in practical terms, especially as it appears in the team editor.
If you want the short version:
* memory is **file-first**
* not all memory is the same
* private continuity, team coordination, team knowledge, and role memory should stay separate
* the team editor should help you see and manage the right layer without mixing them up
This doc builds on the canonical memory model doc:
* [MEMORY\_MODEL.md](memory-model)
***
## Why this exists
Without a clear memory system, teams end up dumping everything everywhere:
* private context leaks into shared files
* ticket status gets mixed with durable knowledge
* role-specific learnings get lost
* nobody knows where to put anything
ClawRecipes avoids that by being explicit about memory layers.
***
## The four memory layers
ClawRecipes uses four memory layers:
1. assistant continuity memory
2. team coordination docs
3. team knowledge memory
4. role memory
The canonical explanation lives here:
* [MEMORY\_MODEL.md](memory-model)
This page is the easier operational guide.
***
## Layer 1: assistant continuity memory
What it is:
* the assistant’s own continuity
* preferences
* personal working context
* long-running private context
Typical files:
* `SOUL.md`
* `USER.md`
* `memory/YYYY-MM-DD.md`
* `MEMORY.md`
Important rule:
* this does **not** belong in the team workspace
Use this for:
* assistant continuity
* private context
* user-specific preferences
Do not use it for:
* shared team knowledge
* team ticket history
* shared operational docs
***
## Layer 2: team coordination docs
What it is:
* the team’s operating surface
* plans, tickets, status, assignments, checklists
Typical files:
* `work/backlog/`
* `work/in-progress/`
* `work/testing/`
* `work/done/`
* `notes/plan.md`
* `notes/status.md`
* `TICKETS.md`
* `AGENTS.md`
Use this for:
* what the team is doing right now
* blockers
* decisions attached to tickets
* ongoing work coordination
Do not use it for:
* curated long-term knowledge base entries
* private assistant memory
***
## Layer 3: team knowledge memory
What it is:
* shared durable knowledge for the whole team
* facts worth keeping
* canonical links
* runbooks
* known fixes
* decisions worth reusing later
Typical files:
```text theme={null}
shared-context/memory/
team.jsonl
pinned.jsonl
```
Use this for:
* reusable knowledge
* facts the whole team should remember
* high-signal decisions worth pinning
This is the memory layer most closely associated with a memory tab in the team editor.
***
## Layer 4: role memory
What it is:
* continuity for one role inside the team
* role-specific learnings and playbooks
Typical files:
```text theme={null}
roles//
MEMORY.md
memory/YYYY-MM-DD.md
```
Use this for:
* role-specific learnings
* role runbooks
* role continuity that should not become global team knowledge yet
Examples:
* QA-specific release checks
* dev-specific implementation gotchas
* lead-specific prioritization habits
***
## Team editor angle
From the team editor point of view, the memory system should feel like a set of clearly separated panels, not one giant dumping ground.
A good team editor should help you understand:
* what belongs in team memory vs role memory
* what is operational status vs durable knowledge
* what is pinned vs append-only
* what should stay private and never move into team memory
### The most useful things the team editor can surface
#### Memory overview
* short explanation of the memory layers
* link to the canonical memory model doc
#### Team memory
* `shared-context/memory/team.jsonl`
* `shared-context/memory/pinned.jsonl`
* counts / recent entries / pinned items
#### Coordination docs
* `notes/status.md`
* `notes/plan.md`
* current ticket lanes
#### Role memory
* links into `roles//MEMORY.md`
* links into role daily memory files
#### Policy docs
* `notes/memory-policy.md`
* any team-specific memory conventions
In other words:
* the editor should help you navigate the memory system
* the files remain the real source of truth
***
## What goes where?
### Put it in team coordination docs when...
* it is about current work
* it is ticket-specific
* it is a progress update
* it is a blocker or immediate plan
### Put it in team knowledge memory when...
* it is reusable later
* the whole team should know it
* it is a known fix / canonical answer / stable reference
### Put it in role memory when...
* it mainly belongs to one role
* it is useful continuity for that role
* it is not yet broad enough to become team-wide knowledge
### Keep it in assistant continuity memory when...
* it is private context
* it is user/assistant specific
* it should not leak into the team workspace
***
## Pinned vs append-only memory
### Append-only memory
This is the stream of memory as things are learned.
Examples:
* `team.jsonl`
* daily memory files
* status logs
### Pinned memory
This is the smaller curated set of high-signal items worth keeping easy to find.
Example:
* `pinned.jsonl`
Rule of thumb:
* append everything useful first
* pin only the things you expect to matter again later
***
## Suggested habits
### After finishing work
* update the ticket comments
* append to `notes/status.md`
* save artifacts to `shared-context/agent-outputs/`
* if a reusable lesson emerged, write it to team memory
* if it is especially important, pin it
### During triage or lead review
* move short-lived work chatter into tickets/status docs
* move durable lessons into team knowledge memory
* curate pinned memory so it stays high-signal
### For role agents
* keep role-specific continuity in role memory
* escalate broadly useful knowledge into team memory
***
## Common mistakes
### 1) Treating status logs like a knowledge base
`notes/status.md` is for operational history, not your long-term memory system.
### 2) Dumping private context into shared memory
Private assistant continuity should stay private.
### 3) Pinning too much
If everything is pinned, nothing is pinned.
### 4) Never promoting useful knowledge
If good lessons stay buried in tickets forever, the team never really learns.
### 5) Skipping role memory
Role memory is useful because not every lesson belongs at the whole-team level.
***
## Simple example
Imagine a team learns these three things:
1. “Ticket 0042 is blocked waiting on API credentials.”
2. “The fix for workflow-runner approval retries is to clear stale locks before requeue.”
3. “QA should always capture screenshots for UI changes.”
Where should they go?
* \#1 → ticket comments / `notes/status.md`
* \#2 → team knowledge memory (`team.jsonl`, maybe pin it)
* \#3 → role memory for QA, and maybe team memory too if it is now a team-wide rule
***
## How this connects to the canonical doc
This page is the practical operating guide.
The canonical model and boundaries remain here:
* [MEMORY\_MODEL.md](memory-model)
If you want the philosophy and the exact layer definitions, read that doc.
If you want to know how to use the memory system day-to-day, start here.
# Outbound posting for workflows
Source: https://docs.clawkitchen.ai/clawrecipes/outbound-posting
If you want ClawRecipes workflows to actually publish content, read this doc.
This is the difference between:
* "the workflow ran"
* and
* "the workflow posted something externally"
Those are not the same thing.
***
## The recommended way: `outbound.post`
ClawRecipes supports workflow publishing through the runner-native tool:
```text theme={null}
outbound.post
```
This tool sends a request to a separate **Outbound Posting Service** that owns the actual platform credentials.
Why this is the preferred path:
* better separation of concerns
* credentials stay out of workflow files
* easier audit logging
* better idempotency / retry safety
* approval proof can be enforced
***
## What you need to configure
`outbound.post` needs two plugin config values:
* `outbound.baseUrl`
* `outbound.apiKey`
If either is missing, the workflow will fail with a clear message.
Example conceptual config values:
```json theme={null}
{
"outbound": {
"baseUrl": "http://localhost:8787",
"apiKey": "your-service-key"
}
}
```
Exact config placement depends on how your OpenClaw deployment manages plugin config.
***
## Example workflow node
```json theme={null}
{
"id": "publish_x",
"kind": "tool",
"assignedTo": { "agentId": "development-team-lead" },
"action": {
"tool": "outbound.post",
"args": {
"platform": "x",
"text": "Hello from ClawRecipes",
"idempotencyKey": ":publish_x",
"runContext": {
"teamId": "development-team",
"workflowId": "marketing",
"workflowRunId": "",
"nodeId": "publish_x"
}
}
}
}
```
***
## Tool arguments
Expected arguments:
```json theme={null}
{
"platform": "x",
"text": "...",
"idempotencyKey": "",
"runContext": {
"teamId": "...",
"workflowId": "...",
"workflowRunId": "...",
"nodeId": "..."
},
"approval": {
"code": "...",
"approvalFileRel": "shared-context/workflow-runs/.../approvals/approval.json"
}
}
```
Notes:
* `platform`, `text`, and `idempotencyKey` are required
* use a stable `idempotencyKey` across retries
* `approval` is optional unless your outbound service requires proof
A good default idempotency key:
```text theme={null}
:
```
***
## Important note about installs and posting
A normal ClawRecipes install does **not** automatically mean posting is active.
### Supported path
If you configure `outbound.post`, great — that is the supported path.
### Local custom patch path
If your controller relies on a custom local patch (for example, a local posting helper wired directly into workflow execution), that patch may need to be reapplied after install/update.
That means after installing or updating ClawRecipes, you may need to:
* reapply your local workflow posting patch, or
* tell your assistant to turn workflow posting back on for your local controller
This is especially important if:
* workflows run successfully
* approvals succeed
* but nothing actually gets posted
***
## Example post-install checklist
After a fresh install or update:
```bash theme={null}
# 1) confirm plugin is installed
openclaw plugins list
# 2) confirm workflow commands exist
openclaw recipes workflows --help
# 3) confirm your posting path is configured or patched
# (depends on your environment)
# 4) run a test workflow
openclaw recipes workflows run \
--team-id development-team \
--workflow-file marketing.workflow.json
```
If you use a local patch, this is the moment to reapply it.
***
## Expected outbound service API
ClawRecipes expects something like:
* `POST /v1//publish`
* `Authorization: Bearer `
* `Idempotency-Key: `
Example success response:
```json theme={null}
{
"ok": true,
"platform": "x",
"id": "123",
"url": "https://x.com/..."
}
```
***
## Security notes
* do **not** put platform credentials in workflow files
* prefer a local/tailnet-only outbound service
* treat outbound publishing as a side-effecting action that should usually be approval-gated
* use idempotency keys so retries do not double-post
# Recipe format
Source: https://docs.clawkitchen.ai/clawrecipes/recipe-format
ClawRecipes recipes are Markdown files with YAML frontmatter.
They come in two flavors:
* **agent** recipes — scaffold one agent workspace
* **team** recipes — scaffold a shared team workspace plus role agents
This doc explains the format you actually need to write.
***
## Where recipes live
Recipes are discovered from:
* built-in plugin recipes: `recipes/default/*.md`
* workspace recipes: `~/.openclaw/workspace/recipes/*.md`
You can inspect available recipes with:
```bash theme={null}
openclaw recipes list
openclaw recipes show development-team
```
***
## Smallest useful recipe
```md theme={null}
---
id: project-manager
name: Project Manager
kind: agent
version: 0.1.0
description: A lightweight planning agent
---
# Project Manager
This is a simple recipe.
```
***
## Common frontmatter fields
```yaml theme={null}
---
id: development-team
name: Development Team
kind: team
version: 0.1.0
description: File-first engineering team
requiredSkills:
- some-skill
optionalSkills:
- another-skill
---
```
### Field meanings
* `id` — stable recipe id
* `name` — human-readable name
* `kind` — `agent` or `team`
* `version` — recipe version string
* `description` — short summary
* `requiredSkills` — skills the recipe really needs
* `optionalSkills` — nice-to-have skills
***
## Agent recipe example
```md theme={null}
---
id: project-manager
name: Project Manager
kind: agent
version: 0.1.0
description: Keeps plans and tasks organized
templates:
soul: |
# SOUL.md
You are a project manager.
agents: |
# AGENTS.md
Track work clearly.
files:
- path: SOUL.md
template: soul
mode: createOnly
- path: AGENTS.md
template: agents
mode: createOnly
tools:
profile: coding
allow: ["group:fs", "group:web"]
deny: ["exec"]
---
# Project Manager
```
Scaffold it with:
```bash theme={null}
openclaw recipes scaffold project-manager --agent-id pm --apply-config
```
***
## Team recipe example
```md theme={null}
---
id: my-team
name: My Team
kind: team
version: 0.1.0
description: Tiny file-first team
team:
teamId: my-team
name: My Team
agents:
- role: lead
name: Team Lead
- role: dev
name: Developer
templates:
lead.soul: |
# SOUL.md
You are the lead.
dev.soul: |
# SOUL.md
You are the developer.
files:
- path: SOUL.md
template: soul
mode: createOnly
---
# My Team
```
Scaffold it with:
```bash theme={null}
openclaw recipes scaffold-team my-team --team-id my-team --apply-config
```
***
## Team ids and agent ids
Important rule:
* team ids used with `scaffold-team` must end with `-team` in many real setups / conventions
Role agent ids normally become:
```text theme={null}
-
```
Examples:
* `development-team-lead`
* `development-team-dev`
* `development-team-test`
***
## Templates and files
### `templates`
`templates` is a string map of template names to template bodies.
### `files`
`files` tells ClawRecipes which files to write into the scaffolded workspace.
Example:
```yaml theme={null}
files:
- path: SOUL.md
template: soul
mode: createOnly
- path: AGENTS.md
template: agents
mode: overwrite
```
### Template rendering
Rendering is intentionally simple:
* `{{var}}` replacement only
* no conditionals
* no code execution
Common variables include:
* `agentId`
* `agentName`
* `teamId`
* `teamDir`
***
## Tools policy
Recipes can write tool policy into agent config when you scaffold with `--apply-config`.
Example:
```yaml theme={null}
tools:
profile: coding
allow:
- group:fs
- group:web
- group:runtime
deny: []
```
Team recipes can also define per-agent tool policies.
***
## Cron jobs
Recipes can optionally define cron jobs.
Example:
```yaml theme={null}
cronJobs:
- id: daily-review
schedule: "0 14 * * 1-5"
message: "Review inbox and summarize priorities."
enabledByDefault: false
timezone: "America/New_York"
```
Notes:
* use valid **5-field cron**
* keep `id` stable
* ClawRecipes can install/reconcile these during scaffold
***
## Skill declarations
If a recipe declares skills, you can install them with:
```bash theme={null}
openclaw recipes install-skill my-team --yes
```
That installs the recipe’s declared `requiredSkills` / `optionalSkills`.
***
## Recommended conventions
* keep recipes small and readable
* keep `requiredSkills` minimal
* use `optionalSkills` for non-essential extras
* prefer file-first workflows
* make the generated workspace obvious to a human reader
* include enough commands/examples in generated docs that a user can actually run the system
***
## Good next steps
After reading this, do one of these:
```bash theme={null}
openclaw recipes show development-team
openclaw recipes show workflow-runner-addon
```
Then read:
* [TUTORIAL\_CREATE\_RECIPE.md](tutorial-create-recipe)
* [BUNDLED\_RECIPES.md](bundled-recipes)
# Shared context conventions (team workspaces)
Source: https://docs.clawkitchen.ai/clawrecipes/shared-context
This is a **file-first** coordination convention for scaffolded teams.
## Goals
* Reduce cross-agent messaging; coordinate via shared files.
* Prevent shared context from becoming a junk drawer.
* Make work auditable: read → act → write loops.
## Directory layout
Team workspaces include:
* `notes/plan.md` — curated plan / priorities (lead-owned)
* `notes/status.md` — current snapshot (short, updated frequently)
* `shared-context/` — shared context + append-only inputs
* `priorities.md` — curated priorities (lead-owned)
* `agent-outputs/` — append-only outputs from non-lead roles
* `feedback/` — QA findings / feedback
* `kpis/` — metrics
* `calendar/` — optional notes
Back-compat:
* `shared/` may exist as a legacy folder. Prefer `shared-context/`.
## Curator model
* **Lead** curates:
* `notes/plan.md`
* `shared-context/priorities.md`
* **Non-lead roles** should not edit curated files.
* Append instead to `shared-context/agent-outputs/` (or `feedback/`).
## Read → Act → Write
Every role should:
1. **Read** plan/status + ticket before acting
2. **Act** (small, safe changes)
3. **Write back**
* update ticket
* add 3–5 bullets to `notes/status.md`
* append detailed outputs to `shared-context/agent-outputs/`
## Migration guidance (existing teams)
Safe migration:
1. Create `shared-context/` and starter subdirs.
2. Add `shared-context/priorities.md` (create-only; do not overwrite).
3. Update agent instructions to reference shared-context and curator model.
No existing files need to be deleted or renamed.
# Swarm Orchestrator
Source: https://docs.clawkitchen.ai/clawrecipes/swarm-orchestrator
This document explains what the **Swarm Orchestrator** is, when to use it, and how to work with it from the team editor.
If you want the short version:
* a normal team handles work through shared files and ticket lanes
* a swarm orchestrator is for **parallel coding work** using **git worktrees + tmux sessions**
* it is best when one lead wants to fan work out to multiple coding agents at once
***
## What it is
The Swarm Orchestrator is a recipe/scaffold that creates an orchestration workspace for parallel coding work.
Its job is to:
* split work into focused tasks
* spin up multiple coding agents in parallel
* give each one its own branch/worktree/session
* track what is active
* help monitor and clean up those parallel tasks
Think of it as a coordination layer for multi-agent coding, not as a replacement for the normal team workspace.
***
## When to use it
Use Swarm Orchestrator when:
* one ticket can be split into several parallel coding tasks
* you want separate branches/worktrees for isolation
* you want to monitor several coding sessions at once
* you want a lead/orchestrator role to coordinate multiple implementation attempts
Do **not** use it when:
* the work is simple enough for one normal ticket/one agent
* you do not want git worktrees
* you do not want tmux sessions
* the extra orchestration overhead is not worth it
***
## What it creates
The bundled `swarm-orchestrator` recipe creates an orchestrator workspace with files like:
```text theme={null}
.clawdbot/
CONVENTIONS.md
PROMPT_TEMPLATE.md
TEMPLATE.md
env.sh
spawn.sh
task.sh
check-agents.sh
cleanup.sh
active-tasks.json
```
These files are the operating surface for the orchestrator.
Important ones:
* `CONVENTIONS.md` — naming rules and defaults
* `PROMPT_TEMPLATE.md` — the required base prompt for spawned coding agents
* `TEMPLATE.md` — starter task/spec shape
* `env.sh` — local environment values
* `spawn.sh` / `task.sh` — start work
* `check-agents.sh` — inspect current swarm sessions
* `cleanup.sh` — safe cleanup helpers
* `active-tasks.json` — lightweight task registry
***
## Core concepts
### Worktree
Each coding task gets its own git worktree.
That means one repo can support multiple isolated task directories at the same time.
### Branch
Each task gets its own branch.
That keeps parallel agent work separated and easier to review.
### tmux session
Each coding agent runs in its own tmux session.
That means you can:
* attach to it
* watch it live
* steer it
* recover it if needed
### Registry
The orchestrator keeps a lightweight registry of active tasks in:
```text theme={null}
.clawdbot/active-tasks.json
```
This is the quick answer to:
* what is running?
* on what branch?
* in which worktree?
* in which tmux session?
***
## Team editor angle
From the team editor point of view, the Swarm Orchestrator is useful when you want a visible place to manage parallel implementation work.
The team editor should help you:
* see whether an orchestrator exists for the team
* see the orchestrator workspace path
* inspect active tasks / sessions / branches
* know where env/config values live
* know which files to edit for conventions and prompts
A good mental model for the team editor is:
* the team editor is the dashboard
* the orchestrator workspace is the operating surface
So if the editor shows a Swarm Orchestrator area, the most useful things it can surface are:
* worktree root
* base ref
* active tasks
* task ids
* tmux session names
* registry status
* links to `.clawdbot/CONVENTIONS.md` and `.clawdbot/PROMPT_TEMPLATE.md`
***
## How to inspect the recipe
```bash theme={null}
openclaw recipes show swarm-orchestrator
```
This is the fastest way to inspect what the bundled recipe currently scaffolds.
***
## Typical setup flow
### 1) Scaffold the orchestrator
The exact scaffold command depends on how you want to install it, but the first thing is to inspect the recipe and then scaffold it into a workspace.
```bash theme={null}
openclaw recipes show swarm-orchestrator
```
If you are using it as a standalone workspace recipe, scaffold it like your other recipes.
***
### 2) Configure environment values
The orchestrator relies on values in `.clawdbot/env.sh`.
Common ones include:
* `SWARM_REPO_DIR`
* `SWARM_WORKTREE_ROOT`
* `SWARM_BASE_REF`
* optional agent-runner command settings
Practical advice:
* keep worktrees in a dedicated folder
* keep that folder outside the repo
* keep it outside the OpenClaw workspace if possible
***
### 3) Check prerequisites
Common prerequisites include:
* `git`
* `tmux`
* `jq`
The orchestrator recipe/source docs also mention these directly.
***
## Starting work
The orchestrator’s job is to start focused tasks.
Typical pattern:
* create a task spec
* choose branch/worktree/session names
* spawn the task
* record/update the registry
The scaffolded scripts are designed to help with that.
Example commands from the orchestrator workspace:
```bash theme={null}
./.clawdbot/task.sh start --task-id 0082 --spec "Implement workflow queue improvements"
```
Or directly:
```bash theme={null}
./.clawdbot/spawn.sh feat-0082-a codex swarm-0082-a
```
Exact flags may vary with your local scaffold/version, so treat the local generated files as the source of truth.
***
## Monitoring work
To inspect current orchestrated work:
```bash theme={null}
./.clawdbot/check-agents.sh
```
And for tmux directly:
```bash theme={null}
tmux ls
tmux attach -t swarm-0082-a
```
Use the registry too:
```bash theme={null}
cat ./.clawdbot/active-tasks.json
```
This gives you the fastest picture of:
* active tasks
* branch names
* worktree paths
* tmux sessions
* rough task status
***
## Cleanup
There is also a cleanup script in the scaffold.
Typical use:
```bash theme={null}
./.clawdbot/cleanup.sh
```
Important rule:
* do **not** delete worktrees/branches casually
* cleanup should stay conservative unless explicitly enabled
That caution matters, because orchestrator cleanup can otherwise destroy in-progress work.
***
## Suggested workflow
A practical orchestrator loop looks like this:
1. identify a ticket worth parallelizing
2. break it into 2–N focused tasks
3. create one branch/worktree/session per task
4. monitor progress via tmux + registry
5. review outputs / PRs
6. merge or discard branches intentionally
7. clean up finished worktrees
***
## Common mistakes
### 1) Using swarm for tiny work
If one agent can do it cleanly, swarm is probably overkill.
### 2) Not setting a dedicated worktree root
That turns cleanup and inspection into a mess.
### 3) Letting naming drift
Use the conventions file. Otherwise you end up with branch/session chaos.
### 4) Treating tmux as optional when debugging
If agents are launched into tmux, tmux is the source of truth for what is actually happening live.
### 5) Deleting worktrees too early
Only clean up once branches/PRs/status are clearly done.
***
## How this should relate to the team editor
The team editor should make orchestrator use easier by exposing:
* whether the team has an orchestrator
* the orchestrator workspace location
* key env/config values
* active tasks summary
* links to conventions/prompt files
* where to monitor/clean up
This is the sweet spot:
* editor for visibility and navigation
* orchestrator workspace/scripts for execution
***
## Recommended related docs
* [TEAM\_WORKFLOW.md](team-workflow)
* [BUNDLED\_RECIPES.md](bundled-recipes)
* [AGENTS\_AND\_SKILLS.md](agents-and-skills)
# Team workflow
Source: https://docs.clawkitchen.ai/clawrecipes/team-workflow
This is the practical guide to how a ClawRecipes team is meant to work.
If you scaffold a team and then ask, “okay, what do we actually do now?” this is the answer.
***
## The core idea
A ClawRecipes team is a **shared workspace** with a **file-first work queue**.
That means:
* requests land in files
* tickets live in files
* agents coordinate through files
* nothing important depends on a specific UI being available
***
## Team workspace layout
A scaffolded team usually looks like this:
```text theme={null}
~/.openclaw/workspace-/
inbox/
outbox/
shared/
notes/
work/
backlog/
in-progress/
testing/
done/
assignments/
roles/
/
```
Common meaning:
* `inbox/` — raw incoming requests
* `work/backlog/` — ready-to-pick tickets
* `work/in-progress/` — active work
* `work/testing/` — QA / verification
* `work/done/` — completed work
* `work/assignments/` — assignment stubs / ownership breadcrumbs
* `shared/` — shared artifacts
* `notes/` — team notes, plans, status
***
## The normal workflow
### 1) Intake
A new request lands in `inbox/`.
This can happen by hand, or through:
```bash theme={null}
openclaw recipes dispatch \
--team-id development-team \
--owner lead \
--request "Add a new clinic-team recipe"
```
That usually creates:
* an inbox item
* a numbered backlog ticket
* an assignment stub
***
### 2) Triage
The lead reviews new requests and turns them into clean tickets.
Good tickets should include:
* context
* requirements
* acceptance criteria
* tasks
* owner
* status
* verification steps
* `## Comments`
Ticket comments matter. If an agent is assigned to a ticket or mentioned in comments, that agent should respond there.
***
### 3) Execution
A dev or devops agent picks up a backlog ticket.
Typical command:
```bash theme={null}
openclaw recipes take --team-id development-team --ticket 0007 --owner dev
```
That assigns the ticket and moves it to `in-progress`.
During execution, the working agent should:
* do the work
* update the ticket
* leave verification notes
* write any needed artifacts to `shared/` or team files
***
### 4) Testing
When the change is ready for QA:
```bash theme={null}
openclaw recipes handoff --team-id development-team --ticket 0007
```
That moves the ticket to `testing` and assigns it to the tester role.
The tester should:
* follow the verification steps
* confirm expected behavior
* move it to done if it passes
* or bounce it back to in-progress if it fails
***
### 5) Completion
When work is done:
```bash theme={null}
openclaw recipes complete --team-id development-team --ticket 0007
```
That moves the ticket to `done` and stamps completion metadata.
***
## Helpful commands
### See current tickets
```bash theme={null}
openclaw recipes tickets --team-id development-team
```
### Move a ticket manually
```bash theme={null}
openclaw recipes move-ticket --team-id development-team --ticket 0007 --to in-progress
openclaw recipes move-ticket --team-id development-team --ticket 0007 --to testing
openclaw recipes move-ticket --team-id development-team --ticket 0007 --to done --completed
```
### Assign without taking
```bash theme={null}
openclaw recipes assign --team-id development-team --ticket 0007 --owner devops
```
### Clean up stale assignment stubs for closed work
```bash theme={null}
openclaw recipes cleanup-closed-assignments --team-id development-team
```
***
## Who picks what up?
The simple rule:
* **backlog** = ready for the implementation owner to pick up
* **lead** = scope/triage/handoff
* **dev/devops/test** = execute their lane of work
If a ticket is sitting in backlog, it should not need repeated human pep talks to become real.
***
## How agents get nudged
There are a few ways a team actually wakes up and does work:
1. a human opens or messages the relevant agent
2. a cron loop runs
3. the lead sees inbox/backlog work and acts
4. a best-effort system nudge reaches the lead session
So if you say, “I dispatched a ticket but nobody picked it up,” the real question is usually: **what is waking the team up?**
***
## Why file-first is useful
Because it gives you:
* durable history
* easy grep/search
* easy git review
* easy debugging
* easy automation
* less dependency on one UI or one database
Related:
* [MEMORY\_SYSTEM.md](memory-system)
* [SWARM\_ORCHESTRATOR.md](swarm-orchestrator)
***
## Recommended daily commands
```bash theme={null}
# See current workload
openclaw recipes tickets --team-id development-team
# Create work from a request
openclaw recipes dispatch --team-id development-team --owner lead --request "Do a thing"
# Start work
openclaw recipes take --team-id development-team --ticket 0001 --owner dev
# Hand off to QA
openclaw recipes handoff --team-id development-team --ticket 0001
# Complete
openclaw recipes complete --team-id development-team --ticket 0001
```
# Template Variables
Source: https://docs.clawkitchen.ai/clawrecipes/template-variables
ClawRecipes supports powerful template variable substitution for workflow prompts, file paths, and content. Variables use double-brace syntax: `{{variable.name}}`.
## Global Variables
These variables are available in all nodes:
* `{{date}}` — Current ISO timestamp (e.g., `2025-04-04T03:53:00.000Z`)
* `{{run.id}}` — Unique run ID (timestamp-based, e.g., `2025-04-04T03-53-00-123Z`)
* `{{run.timestamp}}` — Alias for `{{run.id}}`
* `{{workflow.id}}` — Workflow ID from the JSON file
* `{{workflow.name}}` — Workflow display name (fallback to ID or filename)
* `{{node.id}}` — Current node ID (available in media nodes)
## Upstream Node Variables
Access outputs from previous workflow nodes using the pattern `{{nodeId.fieldName}}`:
### Basic Access Patterns
* `{{nodeId.output}}` — Full JSON output envelope from the node
* `{{nodeId.text}}` — The `text` field from the node output (most common)
* `{{nodeId.fieldName}}` — Any specific field from the node output JSON
### Common Pitfall: output vs text
**Wrong:** `{{brand_review.output}}` returns the full envelope:
```json theme={null}
{
"runId": "2025-04-04T03-53-00-123Z",
"teamId": "marketing-team",
"nodeId": "brand_review",
"kind": "llm",
"text": "Here is my review...",
"completedAt": "2025-04-04T03:53:15.000Z"
}
```
**Right:** `{{brand_review.text}}` returns just the payload:
```
Here is my review...
```
## Nested JSON Extraction
When a node's `text` field contains JSON, ClawRecipes automatically extracts nested fields:
### Example Node Output
```json theme={null}
{
"text": "{\"title\": \"Product Launch\", \"tags\": [\"marketing\"], \"approved\": true}"
}
```
### Available Template Variables
* `{{nodeId.text}}` — Raw JSON string
* `{{nodeId.title}}` — Extracted: "Product Launch"
* `{{nodeId.approved_json}}` — For non-string values: "true"
### Deeply Nested Extraction
If the JSON contains nested objects, fields are flattened:
```json theme={null}
{
"text": "{\"meta\": {\"author\": \"John\", \"priority\": 1}}"
}
```
Available as:
* `{{nodeId.meta_json}}` — Full meta object as JSON string
* `{{nodeId.author}}` — "John" (if meta.author is a string)
## LLM Node Structured Output
LLM nodes with `outputFields` configuration produce predictable JSON structures:
### Configuration
```json theme={null}
{
"config": {
"outputFields": [
{"name": "title", "type": "text"},
{"name": "tags", "type": "list"},
{"name": "metadata", "type": "json"}
]
}
}
```
### Template Access
```
Title: {{nodeId.title}}
Tags: {{nodeId.tags}}
Metadata: {{nodeId.metadata_json}}
```
## Usage Examples
### LLM Prompt Template
```
Review the content from the previous step:
{{brand_review.text}}
Based on this review, create a social media post with:
- Title: engaging and on-brand
- Content: max 280 characters
- Hashtags: 3-5 relevant tags
Current date: {{date}}
Workflow: {{workflow.name}}
```
### File Path Templates
```json theme={null}
{
"tool": "fs.write",
"args": {
"path": "content/{{run.id}}/{{brand_review.title}}.md",
"content": "# {{brand_review.title}}\n\n{{brand_review.text}}"
}
}
```
### Media Node Prompts
```json theme={null}
{
"config": {
"promptTemplate": "Create an image for: {{content_draft.title}}\n\nStyle: {{brand_review.style}}\nMood: professional and engaging"
}
}
```
## Implementation Details
Template substitution happens in the workflow worker during node execution. The code path is:
* **Primary**: `src/lib/workflows/workflow-worker.ts` — `buildTemplateVars()` function
* **Utility**: `src/lib/workflows/workflow-utils.ts` — `templateReplace()` function
### Variable Resolution Process
1. **Global vars** are built from run metadata and timestamps
2. **Node outputs** are loaded from each completed node's output file
3. **JSON parsing** attempts to extract fields from the `text` field
4. **Nested extraction** flattens nested objects with `_json` suffixes for non-strings
5. **Template replacement** applies all variables using simple string substitution
### Performance Notes
* Variables are rebuilt for each node execution (fresh state)
* Large node outputs are fully loaded into memory during template resolution
* JSON parsing failures are silently ignored (graceful degradation)
## Best Practices
### Variable Naming
* Use descriptive node IDs: `brand_review` not `step1`
* Design consistent output field names across nodes
* Use `outputFields` for structured LLM outputs
### Error Handling
* Always provide fallbacks: `{{nodeId.title || "Untitled"}}`
* Test templates with missing/malformed node outputs
* Use `{{nodeId.text}}` when unsure about field structure
### Memory Management
* Avoid extremely large text outputs in frequently-referenced nodes
* Consider splitting large data into separate file outputs
## Common Patterns
### Content Pipeline
```
1. research_node.text → "Market analysis shows..."
2. draft_node template: "Based on {{research_node.text}}, write..."
3. review_node template: "Review this draft: {{draft_node.text}}"
```
### Conditional Content
```
{% if brand_review.approved %}
Approved content: {{brand_review.text}}
{% else %}
Needs revision: {{brand_review.feedback}}
{% endif %}
```
Note: ClawRecipes uses simple string substitution, not template engines like Jinja2. Complex conditionals should be handled in LLM prompts.
## Related Documentation
* [WORKFLOW\_NODES.md](workflow-nodes) — Node types and configuration
* [WORKFLOW\_EXAMPLES.md](workflow-examples) — Template usage examples
* [MEDIA\_GENERATION.md](media-generation) — Media node templates and variables
# Tutorial: create your first recipe
Source: https://docs.clawkitchen.ai/clawrecipes/tutorial-create-recipe
This tutorial shows how to create a simple **team recipe** from scratch.
By the end, you will:
* create a recipe file
* scaffold a team
* dispatch a ticket
* move work through the file-first flow
***
## Step 0 — confirm ClawRecipes is installed
```bash theme={null}
openclaw plugins list
openclaw recipes list
```
If that fails, go back to [INSTALLATION.md](installation).
***
## Step 1 — create a recipe file
Create this file:
```text theme={null}
~/.openclaw/workspace/recipes/my-first-team.md
```
Paste this in:
```md theme={null}
---
id: my-first-team
name: My First Team
kind: team
version: 0.1.0
description: A tiny demo team
requiredSkills: []
team:
teamId: my-first-team
name: My First Team
agents:
- role: lead
name: Team Lead
tools:
profile: coding
allow: ["group:fs", "group:web"]
deny: ["exec"]
- role: worker
name: Worker
tools:
profile: coding
allow: ["group:fs", "group:web"]
deny: ["exec"]
templates:
lead.soul: |
# SOUL.md
You are the lead for {{teamId}}.
Turn requests into clear tickets.
lead.agents: |
# AGENTS.md
Team directory: {{teamDir}}
Do this:
- check inbox/
- create backlog tickets
- assign work clearly
worker.soul: |
# SOUL.md
You are a worker on {{teamId}}.
worker.agents: |
# AGENTS.md
Team directory: {{teamDir}}
Do this:
- pick assigned work
- move it to in-progress
- do the work
- hand off to testing when ready
files:
- path: SOUL.md
template: soul
mode: createOnly
- path: AGENTS.md
template: agents
mode: createOnly
tools:
profile: coding
allow: ["group:fs", "group:web"]
deny: ["exec"]
---
# My First Team
This is a tutorial recipe.
```
***
## Step 2 — scaffold the team
```bash theme={null}
openclaw recipes scaffold-team my-first-team \
--team-id my-first-team \
--apply-config
```
You should now have a shared workspace like:
```text theme={null}
~/.openclaw/workspace-my-first-team/
```
Look around:
```bash theme={null}
find ~/.openclaw/workspace-my-first-team -maxdepth 3 -type f | sort | head -n 50
```
***
## Step 3 — create work
Dispatch a request into the team:
```bash theme={null}
openclaw recipes dispatch \
--team-id my-first-team \
--owner lead \
--request "Draft a welcome README for this team"
```
Now inspect tickets:
```bash theme={null}
openclaw recipes tickets --team-id my-first-team
```
***
## Step 4 — move work through the lanes
Start the ticket:
```bash theme={null}
openclaw recipes take --team-id my-first-team --ticket 0001 --owner worker
```
Hand it to testing:
```bash theme={null}
openclaw recipes handoff --team-id my-first-team --ticket 0001
```
Complete it:
```bash theme={null}
openclaw recipes complete --team-id my-first-team --ticket 0001
```
***
## Step 5 — inspect the generated workspace
Useful commands:
```bash theme={null}
find ~/.openclaw/workspace-my-first-team/work -maxdepth 2 -type f | sort
cat ~/.openclaw/workspace-my-first-team/work/done/0001-*.md
```
This is the whole point: the team’s work is visible and durable on disk.
***
## Common mistakes
### Using the wrong team id
Use a stable team id and keep it consistent.
### Forgetting `--apply-config`
If you want agent config entries written automatically, include `--apply-config`.
### Expecting magic after install
ClawRecipes gives you the scaffolding and workflow system, but optional workflow features (LLM nodes, posting, etc.) may still require extra setup depending on your environment.
***
## Next steps
Read these next:
* [RECIPE\_FORMAT.md](recipe-format)
* [TEAM\_WORKFLOW.md](team-workflow)
* [WORKFLOW\_RUNS\_FILE\_FIRST.md](workflow-runs-file-first)
And inspect a bundled recipe:
```bash theme={null}
openclaw recipes show development-team
```
# Verify built-in team recipes (scaffold + cron jobs)
Source: https://docs.clawkitchen.ai/clawrecipes/verify-built-in-team-recipes
This checklist verifies that each built-in **team** recipe scaffolds correctly and that any recipe-defined cron jobs reconcile safely.
## Prereqs
* You have OpenClaw installed and `openclaw` is on PATH.
* Set recipes cron installation behavior in config (safe default is `prompt`).
* `cronInstallation: prompt` ⇒ asks before installing cron jobs
* `cronInstallation: on` ⇒ installs cron jobs (enabled state still depends on `enabledByDefault`)
* `cronInstallation: off` ⇒ skips cron reconciliation
## Teams to verify
* product-team
* research-team
* writing-team
* social-team
* customer-support-team
* development-team
## Commands
### Scaffold each team
> Note: `--team-id` must end with `-team`.
For each recipe id `` above:
```bash theme={null}
openclaw recipes scaffold-team --team-id -team --apply-config
```
### Verify scaffold output
For each `~/.openclaw/workspace--team/` ensure:
* `notes/plan.md` exists
* `notes/status.md` exists
* `shared-context/priorities.md` exists
* `shared-context/agent-outputs/` exists
* `work/backlog/`, `work/in-progress/`, `work/testing/`, `work/done/` exist
### Verify cron reconciliation behavior
1. With `cronInstallation: prompt`:
* Re-run scaffold-team and confirm you are prompted.
* Answer **No** and verify that installed jobs are created **disabled** (or not created, depending on implementation).
2. With `cronInstallation: on`:
* Re-run scaffold-team and verify recipe cron jobs are installed.
3. Confirm jobs are listed:
```bash theme={null}
openclaw cron list
```
4. Optionally force-run a job:
```bash theme={null}
openclaw cron run
```
## Cleanup (important)
These verification commands create temporary `workspace-` directories.
After you finish (or between runs), clean up test workspaces so they don’t accumulate:
```bash theme={null}
openclaw recipes cleanup-workspaces --prefix smoke- --prefix qa- --prefix tmp- --prefix test- --yes
```
## What to record
* Any recipe that fails to scaffold
* Any cron job install/update errors
* Any cron job that runs but fails (include logs / error output)
# Workflow Approvals
Source: https://docs.clawkitchen.ai/clawrecipes/workflow-approvals
Human approval nodes (`human_approval`) pause workflow execution for manual review. This document covers the runtime behavior, state management, and approval flow.
## Approval Flow Overview
1. **Node Execution** — Worker reaches approval node
2. **Pause State** — Run status changes to `awaiting_approval`
3. **Message Sent** — Approval request sent to configured channel
4. **Human Decision** — User replies with approve/decline command
5. **State Update** — Approval recorded to disk
6. **Resume** — Workflow continues or loops back for revision
## Runtime Behavior
### Node Status Transition
When a workflow worker processes a `human_approval` node:
```
node.status: undefined → waiting → waiting_approval
run.status: running → awaiting_approval
```
The worker:
1. Creates approval directory: `workflow-runs/{runId}/approvals/`
2. Generates random approval code (6-char uppercase)
3. Writes `approval.json` with pending status
4. Sends message to configured channel with approval code
5. Marks node as waiting in run state
6. Pauses execution (no further nodes enqueued)
### State Files Written
**Run Log Update** (`workflow-runs/{runId}/run.json`):
```json theme={null}
{
"status": "awaiting_approval",
"nodeStates": {
"approval_node": {"status": "waiting", "ts": "2025-04-04T03:53:15.000Z"}
},
"events": [
{
"ts": "2025-04-04T03:53:15.000Z",
"type": "node.awaiting_approval",
"nodeId": "approval_node",
"bindingId": "telegram:account:mybot",
"approvalFile": "workflow-runs/2025-04-04T03-53-00-123Z/approvals/approval.json"
}
],
"nodeResults": [
{
"nodeId": "approval_node",
"kind": "human_approval",
"approvalBindingId": "telegram:account:mybot",
"approvalFile": "workflow-runs/2025-04-04T03-53-00-123Z/approvals/approval.json"
}
]
}
```
**Approval Record** (`workflow-runs/{runId}/approvals/approval.json`):
```json theme={null}
{
"runId": "2025-04-04T03-53-00-123Z",
"teamId": "marketing-team",
"workflowFile": "content-pipeline.workflow.json",
"nodeId": "approval_node",
"bindingId": "telegram:account:mybot",
"requestedAt": "2025-04-04T03:53:15.000Z",
"status": "pending",
"code": "XY4K91",
"ticket": "work/in-progress/0042-social-media-campaign.md",
"runLog": "workflow-runs/2025-04-04T03-53-00-123Z/run.json"
}
```
## Message Template Rendering
The approval message includes template variable substitution:
**Template Variables Available:**
* `{{workflow.name}}` — Workflow display name
* `{{code}}` — Generated approval code
* `{{ticket}}` — Relative path to ticket file
* Proposed content preview (from prior node outputs)
**Default Message Template:**
```
Approval requested: {{workflow.name}}
Ticket: {{ticket}}
Code: {{code}}
---
PROPOSED POST (X)
---
{{proposed_content}}
Reply with:
- approve {{code}}
- decline {{code}}
(You can also review in Kitchen: http://localhost:7777/teams/{{teamId}}/workflows/{{workflow.id}})
```
**Proposed Content Logic:**
1. Look for `qc_brand` node output first
2. Fall back to most recent prior LLM node
3. Extract `text` field and sanitize for preview
4. Show "(Warning: no proposed text found)" if unavailable
## Human Response Handling
### Command Format
Users reply in the configured channel:
```
approve XY4K91
decline XY4K91 needs better headlines
```
**Parsing Rules:**
* Case-insensitive verb matching: `approve|decline`
* Code must be exact (uppercase)
* Optional note after code for decline responses
* Parser checks multiple lines, prefers last match
### Auto-Processing
When a user replies with a valid approval command:
1. **Event Detection** — Plugin listener matches approval format
2. **Code Lookup** — Searches all team runs for matching pending approval
3. **Decision Recording** — Updates approval.json status and note
4. **Auto-Resume** — Calls resume workflow to continue execution
**Supported Channels:**
* Telegram (primary)
* Other channels with conditional processing based on metadata
## Resume and Continuation
### Approval Resume
**Approved Flows:**
```
approval.status: pending → approved
node.status: waiting → success
run.status: awaiting_approval → running
→ Next node enqueued
```
**Rejection Flows:**
```
approval.status: pending → rejected
node.status: waiting → error
run.status: awaiting_approval → needs_revision
→ Loop back to revision node
```
### Revision Logic
When an approval is declined:
1. **Find revision target** — Prefers `draft_assets` node, else closest prior LLM node
2. **Clear node states** — Remove status for revision node onward
3. **Clear locks** — Remove any stale node lock files
4. **Enqueue revision** — Send revision task to appropriate agent
5. **Include feedback** — Pass human note in task packet
**Revision Node Selection:**
```typescript theme={null}
// Preferred: explicit draft_assets node
let reviseIdx = workflow.nodes.findIndex(n => n.id === 'draft_assets');
// Fallback: most recent LLM node before approval
if (reviseIdx < 0) {
for (let i = approvalIdx - 1; i >= 0; i--) {
if (workflow.nodes[i]?.kind === 'llm') {
reviseIdx = i;
break;
}
}
}
```
## Configuration
### Node Configuration
```json theme={null}
{
"id": "final_approval",
"kind": "human_approval",
"action": {
"approvalBindingId": "telegram:account:mybot"
},
"config": {
"provider": "telegram",
"target": "6477250615",
"accountId": "mybot",
"agentId": "marketing-team-lead"
}
}
```
**Configuration Hierarchy:**
1. `approvalBindingId` → Look up in OpenClaw config bindings
2. `config.target` → Direct channel target
3. Back-compat fallbacks for known account IDs
### Agent Assignment
Approval nodes are executed by:
1. **Explicit `config.agentId`** — Workflow author override
2. **Team lead** — `${teamId}-lead` (default orchestrator)
3. **Current agent** — Fallback for backwards compatibility
## Command Line Interface
### Manual Approval
```bash theme={null}
openclaw recipes workflows approve \
--team-id marketing-team \
--run-id 2025-04-04T03-53-00-123Z \
--approved true
openclaw recipes workflows approve \
--team-id marketing-team \
--run-id 2025-04-04T03-53-00-123Z \
--approved false \
--note "Headlines need work"
```
### Resume Workflow
```bash theme={null}
openclaw recipes workflows resume \
--team-id marketing-team \
--run-id 2025-04-04T03-53-00-123Z
```
### Poll Approvals
```bash theme={null}
# Auto-resume any decided approvals
openclaw recipes workflows poll-approvals \
--team-id marketing-team \
--limit 20
```
## Implementation Details
### Code Locations
**Primary Approval Logic:**
* `src/lib/workflows/workflow-approvals.ts`
* `approveWorkflowRun()` — Record approval decision
* `resumeWorkflowRun()` — Continue/revise after decision
* `pollWorkflowApprovals()` — Auto-resume decided approvals
**Worker Execution:**
* `src/lib/workflows/workflow-worker.ts`
* Approval node execution in `runWorkflowWorkerTick()`
* Message sending and state management
**Event Handling:**
* `index.ts` — Auto-approval reply handler in plugin registration
### File Structure
```
workspace-{teamId}/
└── shared-context/
└── workflow-runs/
└── {runId}/
├── run.json # Main run state
├── approvals/
│ └── approval.json # Approval record
├── locks/ # Node execution locks
└── node-outputs/ # Node result files
```
## Error Handling
### Missing Targets
```
Node final_approval missing approval target (provide config.target or binding mapping)
```
**Solution:** Configure `config.target` or add binding in OpenClaw config.
### Code Not Found
```
[recipes] approval reply not matched: code=XY4K91
```
**Causes:**
* Code already processed/expired
* Wrong team workspace searched
* Approval file corrupted
### Resume Failures
```
Approval still pending. Update approval.json first.
```
**Solution:** Record decision with `workflows approve` before resuming.
## Best Practices
### Node Placement
* Place approval nodes after content generation but before publishing
* Use descriptive node IDs: `final_approval`, `brand_review`, `legal_check`
### Message Configuration
* Always configure approval binding in OpenClaw config for production
* Test approval flow with known test accounts/channels
* Include meaningful context in approval messages
### Error Recovery
* Monitor approval files for stuck `pending` status
* Use `poll-approvals` for automated processing
* Set up alerting for approval timeouts
### Workflow Design
* Design clear revision loops with identifiable `draft_assets` nodes
* Keep approval criteria specific and actionable
* Document approval responsibilities in team workflows
## Related Documentation
* [WORKFLOW\_NODES.md](workflow-nodes) — All node types and configuration
* [TEMPLATE\_VARIABLES.md](template-variables) — Message template variables
* [OUTBOUND\_POSTING.md](outbound-posting) — Publishing after approval
* [COMMANDS.md](commands) — CLI workflow commands
# Workflow examples
Source: https://docs.clawkitchen.ai/clawrecipes/workflow-examples
This document gives you copyable workflow patterns for ClawRecipes.
Use it together with:
* [WORKFLOW\_RUNS\_FILE\_FIRST.md](workflow-runs-file-first) — concepts, node kinds, triggers, runs, edges
* [OUTBOUND\_POSTING.md](outbound-posting) — publishing/posting setup
***
## Example 1: simplest possible workflow
Use this when you just want to prove the runner works.
```json theme={null}
{
"id": "append-demo",
"name": "Append demo",
"nodes": [
{ "id": "start", "kind": "start" },
{
"id": "append_log",
"kind": "tool",
"assignedTo": { "agentId": "development-team-lead" },
"action": {
"tool": "fs.append",
"args": {
"path": "shared-context/APPEND_LOG.md",
"content": "- {{date}} run={{run.id}}\n"
}
}
},
{ "id": "end", "kind": "end" }
],
"edges": [
{ "from": "start", "to": "append_log", "on": "success" },
{ "from": "append_log", "to": "end", "on": "success" }
]
}
```
What it does:
* starts
* appends one line to a file
* ends
***
## Example 2: LLM draft only
Use this when you want the workflow to generate text and stop there.
```json theme={null}
{
"id": "draft-only",
"name": "Draft only",
"nodes": [
{ "id": "start", "kind": "start" },
{
"id": "draft_post",
"kind": "llm",
"assignedTo": { "agentId": "development-team-lead" },
"action": {
"promptTemplate": "Write a short product update for X announcing a new workflow feature."
}
},
{ "id": "end", "kind": "end" }
],
"edges": [
{ "from": "start", "to": "draft_post", "on": "success" },
{ "from": "draft_post", "to": "end", "on": "success" }
]
}
```
What it does:
* drafts content with an LLM
* writes the output to `node-outputs/`
* finishes without posting anything
***
## Example 3: draft → approve → publish
Use this when you want a human review step before external posting.
```json theme={null}
{
"id": "draft-approve-publish",
"name": "Draft, approve, publish",
"nodes": [
{ "id": "start", "kind": "start" },
{
"id": "draft_post",
"kind": "llm",
"assignedTo": { "agentId": "development-team-lead" },
"action": {
"promptTemplate": "Write a short X post announcing our new feature."
}
},
{
"id": "approval",
"kind": "human_approval",
"assignedTo": { "agentId": "development-team-lead" },
"action": {
"approvalBindingId": "marketing-approval"
}
},
{
"id": "publish_x",
"kind": "tool",
"assignedTo": { "agentId": "development-team-lead" },
"action": {
"tool": "outbound.post",
"args": {
"platform": "x",
"text": "Hello from ClawRecipes",
"idempotencyKey": "draft-approve-publish:publish_x"
}
}
},
{ "id": "end", "kind": "end" }
],
"edges": [
{ "from": "start", "to": "draft_post", "on": "success" },
{ "from": "draft_post", "to": "approval", "on": "success" },
{ "from": "approval", "to": "publish_x", "on": "success" },
{ "from": "publish_x", "to": "end", "on": "success" }
]
}
```
What it does:
* drafts text
* pauses for approval
* publishes only after approval
***
## Example 4: writeback after work finishes
Use this when you want the workflow to leave a durable note in team files.
```json theme={null}
{
"id": "writeback-demo",
"name": "Writeback demo",
"nodes": [
{ "id": "start", "kind": "start" },
{
"id": "append_log",
"kind": "tool",
"assignedTo": { "agentId": "development-team-lead" },
"action": {
"tool": "fs.append",
"args": {
"path": "shared-context/APPEND_LOG.md",
"content": "- workflow ran at {{date}}\n"
}
}
},
{
"id": "write_summary",
"kind": "writeback",
"assignedTo": { "agentId": "development-team-lead" },
"action": {
"writebackPaths": ["notes/status.md"]
}
},
{ "id": "end", "kind": "end" }
],
"edges": [
{ "from": "start", "to": "append_log", "on": "success" },
{ "from": "append_log", "to": "write_summary", "on": "success" },
{ "from": "write_summary", "to": "end", "on": "success" }
]
}
```
***
## Example 5: success path and failure path
Use this when you want different behavior after success vs failure.
```json theme={null}
{
"id": "success-error-paths",
"name": "Success and error branches",
"nodes": [
{ "id": "start", "kind": "start" },
{
"id": "publish_x",
"kind": "tool",
"assignedTo": { "agentId": "development-team-lead" },
"action": {
"tool": "outbound.post",
"args": {
"platform": "x",
"text": "Hello from ClawRecipes",
"idempotencyKey": "success-error-paths:publish_x"
}
}
},
{
"id": "notify_failure",
"kind": "tool",
"assignedTo": { "agentId": "development-team-lead" },
"action": {
"tool": "message",
"args": {
"action": "send",
"channel": "telegram",
"target": "123456",
"message": "Workflow publish step failed"
}
}
},
{ "id": "end", "kind": "end" }
],
"edges": [
{ "from": "start", "to": "publish_x", "on": "success" },
{ "from": "publish_x", "to": "end", "on": "success" },
{ "from": "publish_x", "to": "notify_failure", "on": "error" },
{ "from": "notify_failure", "to": "end", "on": "success" }
]
}
```
***
## Example 6: cron-triggered workflow skeleton
Use this when you want a workflow definition that is meant to run on a schedule.
```json theme={null}
{
"id": "weekday-summary",
"name": "Weekday summary",
"triggers": [
{
"kind": "cron",
"cron": "0 14 * * 1-5",
"tz": "America/New_York"
}
],
"nodes": [
{ "id": "start", "kind": "start" },
{
"id": "draft_summary",
"kind": "llm",
"assignedTo": { "agentId": "development-team-lead" },
"action": {
"promptTemplate": "Write a short weekday status summary."
}
},
{ "id": "end", "kind": "end" }
],
"edges": [
{ "from": "start", "to": "draft_summary", "on": "success" },
{ "from": "draft_summary", "to": "end", "on": "success" }
]
}
```
***
## Common mistakes
### 1) Expecting `if` or `delay` nodes to work as first-class built-ins
They are not first-class built-in node kinds today.
### 2) Forgetting `assignedTo.agentId`
Several node kinds require it.
### 3) Expecting install to automatically enable posting
Workflow support and workflow posting are not the same thing.
### 4) Using paths outside the team workspace
`fs.append` is intentionally constrained.
### 5) Assuming all incoming edges must succeed
Current incoming-edge semantics are OR, not AND.
***
## Suggested learning order
If you are new to workflows, read in this order:
1. [WORKFLOW\_RUNS\_FILE\_FIRST.md](workflow-runs-file-first)
2. this file
3. [OUTBOUND\_POSTING.md](outbound-posting)
# Workflow Node Reference (ClawRecipes)
Source: https://docs.clawkitchen.ai/clawrecipes/workflow-nodes
This document is the **runtime** reference for workflow node configuration in ClawRecipes.
ClawKitchen (the UI) edits workflow JSON files, but the actual execution semantics live here.
If you’re new to the file format, start with:
* [WORKFLOW\_RUNS\_FILE\_FIRST.md](workflow-runs-file-first)
***
## Mental model
A workflow run is a directory on disk containing a `run.json` (and logs/deliverables). The worker executes nodes in order, persists each node’s output, and downstream nodes reference upstream outputs via `{{ }}` template variables.
### Template variables
At runtime, ClawRecipes replaces `{{vars}}` in strings inside node configs.
There are two broad categories:
**Global vars** (always available):
* `{{date}}`
* `{{run.id}}`
* `{{workflow.id}}`
* `{{workflow.name}}`
* `{{node.id}}`
**Upstream node vars** (depend on prior nodes):
* `{{someNode.output}}` — the full stored output envelope
* `{{someNode.text}}` — the most common “payload string” field
* `{{someNode.someField}}` — a field extracted from JSON inside the node’s `text` (when applicable)
Notes:
* If an upstream node stores JSON inside its `text` field, the template system can extract nested fields (e.g. `{{draft_assets.video_brief}}`).
* If you see “garbled JSON” showing up in a media prompt, you’re usually templating the *envelope* (e.g. `{{draft_assets.output}}`) instead of the intended field (e.g. `{{draft_assets.text}}` or `{{draft_assets.video_brief}}`).
***
## Node types
This section describes the important node types and the config fields the worker actually reads.
### LLM nodes
LLM nodes execute via the `llm-task` tool.
Common config fields (stored under `node.config`):
* `promptTemplate` (string): the prompt content, after template-var substitution
* `timeoutMs` (number, optional)
* `model` (string, optional): provider/model selection (node → workflow → global precedence)
#### outputFields (structured output)
If `node.config.outputFields` is present, ClawRecipes will:
1. Append an explicit OUTPUT FORMAT section to the prompt
2. Derive a JSON Schema and pass it to `llm-task`
That means the LLM output is **validated**.
Shape:
```json theme={null}
{
"outputFields": [
{"name": "summary", "type": "text"},
{"name": "angles", "type": "list"},
{"name": "metadata", "type": "json"}
]
}
```
Types:
* `text` → JSON string
* `list` → array of strings
* `json` → JSON object
***
### Media nodes (image/video/audio)
Media nodes ultimately produce a file deliverable. ClawRecipes invokes a **MediaDriver** selected by `provider`.
Provider selection:
* In workflow JSON, providers are referenced as `skill-`
* At runtime the worker strips `skill-` and looks up a driver by slug
#### Common media config fields
These are passed through to drivers as `opts.config`:
* `size` (string):
* For images, typically pixel size like `1024x1024`, `1792x1024`, `1024x1792`
* Some providers interpret this differently (drivers may map pixel sizes to tiers)
* `duration` (string or number): duration in seconds, e.g. `"5s"`, `"10s"`, or `10`
* `aspect_ratio` (string): e.g. `"16:9"`, `"9:16"` (provider-specific)
* `quality` / `style`: image-provider-specific fields (ex: OpenAI)
* `addRefinement` (boolean): **opt-in** prompt refinement pass for video/audio.
* Default is OFF. When enabled, the worker runs an extra `llm-task` call to refine the prompt before invoking the driver.
#### Driver constraints
Drivers can optionally declare duration constraints (`minSeconds/maxSeconds/defaultSeconds`).
Kitchen surfaces these constraints as UX hints, but the runtime is the source of truth.
***
### Tool nodes
Tool nodes call a tool by name with JSON args. Example:
* `fs.append`
* `outbound.post`
* `message.send`
Tool nodes support template vars inside string args.
***
### Human approval nodes
Human approval nodes pause execution until an approval is granted in the UI.
Common pattern:
* Upstream LLM generates a draft
* Approval node shows a `messageTemplate` (with template vars)
* Downstream nodes continue only after approval
***
## Adding new capabilities (where to change code)
* LLM output shaping/validation: `src/lib/workflows/workflow-worker.ts`
* Media providers: `src/lib/workflows/media-drivers/`
* CLI for Kitchen dropdown: `openclaw recipes workflows media-drivers` (handler: `src/handlers/media-drivers.ts`)
***
## Troubleshooting quick hits
* **Provider missing in dropdown**: run `openclaw recipes workflows media-drivers` and check `available` / `missingEnvVars`.
* **Media node ignores config**: confirm the driver reads `opts.config` (not all scripts support every knob).
* **Bad video quality**: ensure your prompt is a single clear scene brief; avoid multi-scene paragraphs when the provider needs a seed frame.
# Workflow runs: file-first guide
Source: https://docs.clawkitchen.ai/clawrecipes/workflow-runs-file-first
This document explains how ClawRecipes workflows work in practice.
If you want a copy-paste cookbook after reading this reference, also see:
* [WORKFLOW\_NODES.md](workflow-nodes) — runtime node config reference (LLM/media/tool/approval)
* [WORKFLOW\_EXAMPLES.md](workflow-examples)
If you are trying to answer any of these questions, start here:
* Where do workflow files live?
* What node types are available?
* What do triggers do?
* What is a run?
* How do edges work?
* How do I run one manually?
* What does the runner do?
* What does the worker do?
* How do approvals work?
* Why did a run fail or stop?
* Why is posting still off after install?
***
## Mental model
ClawRecipes workflows are **file-first**.
That means:
* workflow definitions live on disk
* workflow runs live on disk
* approvals live on disk
* node outputs live on disk
* debugging usually starts by reading files, not opening a database
This is intentional.
***
## Where workflow files live
Workflow definitions live here inside a team workspace:
```text theme={null}
~/.openclaw/workspace-/shared-context/workflows/
```
Example:
```text theme={null}
~/.openclaw/workspace-development-team/shared-context/workflows/marketing.workflow.json
```
***
## What a workflow file looks like
At a high level, a workflow file contains:
* workflow metadata (`id`, optional `name`)
* optional `triggers`
* `nodes`
* optional `edges`
Minimal example:
```json theme={null}
{
"id": "demo",
"name": "Simple demo",
"nodes": [
{ "id": "start", "kind": "start" },
{
"id": "append_log",
"kind": "tool",
"assignedTo": { "agentId": "development-team-lead" },
"action": {
"tool": "fs.append",
"args": {
"path": "shared-context/APPEND_LOG.md",
"content": "- run={{run.id}}\n"
}
}
},
{ "id": "end", "kind": "end" }
],
"edges": [
{ "from": "start", "to": "append_log", "on": "success" },
{ "from": "append_log", "to": "end", "on": "success" }
]
}
```
***
## Available workflow node types
These are the **current first-class node kinds** supported by the runner.
### Quick chooser
Use this when you are deciding what kind of node to add:
* use **`start`** when you want a visible graph entry point
* use **`end`** when you want a visible graph exit point
* use **`llm`** when you want the workflow to generate or transform content with an LLM
* use **`tool`** when you want the workflow to call a tool or side-effecting action
* use **`human_approval`** when a person must approve before the workflow continues
* use **`writeback`** when you want to append workflow breadcrumbs/results into team files
* use **`media-image`** when you want to generate images as part of the workflow
* use **`media-video`** when you want to generate video content as part of the workflow
* use **`media-audio`** when you want to generate audio content as part of the workflow
### `start`
Purpose:
* visual or structural start node
* useful in UI-authored workflows
* treated as a no-op by the runner
What it does at runtime:
* marks itself successful
* does not perform work
Example:
```json theme={null}
{ "id": "start", "kind": "start" }
```
### `end`
Purpose:
* visual or structural end node
* used to make the workflow graph readable
* treated as a no-op by the runner
What it does at runtime:
* marks itself successful
* does not perform work
Example:
```json theme={null}
{ "id": "end", "kind": "end" }
```
### `llm`
Purpose:
* run an LLM step in the workflow
* generate structured or text-like content and store it as node output JSON
Use it when:
* you want to draft content
* you want to transform or summarize earlier node output
* you want a workflow step to reason over previous results before the next action
Required pieces:
* `assignedTo.agentId`
* either `action.promptTemplatePath` or `action.promptTemplate`
What it does:
* builds a task prompt
* calls `llm-task-fixed` if present, otherwise falls back to `llm-task`
* passes upstream node output when available
* writes result JSON into the run’s `node-outputs/`
Example using an inline prompt:
```json theme={null}
{
"id": "draft_post",
"kind": "llm",
"assignedTo": { "agentId": "development-team-lead" },
"action": {
"promptTemplate": "Write a short product update for X announcing the new workflow runner."
}
}
```
Example using a prompt template file:
```json theme={null}
{
"id": "draft_post",
"kind": "llm",
"assignedTo": { "agentId": "development-team-lead" },
"action": {
"promptTemplatePath": "shared-context/prompts/draft-post.md"
}
}
```
Optional output path override:
```json theme={null}
{
"id": "draft_post",
"kind": "llm",
"assignedTo": { "agentId": "development-team-lead" },
"action": {
"promptTemplate": "Write a short changelog entry."
},
"output": {
"path": "node-outputs/custom-draft.json"
}
}
```
### `tool`
Purpose:
* run a tool action during the workflow
Use it when:
* you want to write a file
* send a message
* publish content
* call another tool after an LLM step
Current behavior:
* supports runner-native special handling for some tools
* otherwise falls back to normal tool invocation by tool name
* stores result/error artifacts in `artifacts/`
Currently important built-in / special-cased tools:
#### `fs.append`
Use when you want to append text into a file in the team workspace.
Required args:
* `path`
* `content`
Example:
```json theme={null}
{
"id": "append_log",
"kind": "tool",
"assignedTo": { "agentId": "development-team-lead" },
"action": {
"tool": "fs.append",
"args": {
"path": "shared-context/APPEND_LOG.md",
"content": "- {{date}} run={{run.id}}\n"
}
}
}
```
Notes:
* path must stay within the team workspace
* simple template vars are supported in args like `{{date}}`, `{{run.id}}`, `{{workflow.id}}`
#### `outbound.post`
Use when you want a workflow to publish externally through the supported outbound posting service.
Required args:
* `platform`
* `text`
* `idempotencyKey`
Required plugin config:
* `outbound.baseUrl`
* `outbound.apiKey`
Example:
```json theme={null}
{
"id": "publish_x",
"kind": "tool",
"assignedTo": { "agentId": "development-team-lead" },
"action": {
"tool": "outbound.post",
"args": {
"platform": "x",
"text": "Hello from ClawRecipes",
"idempotencyKey": "{{run.id}}:publish_x",
"runContext": {
"teamId": "development-team",
"workflowId": "marketing",
"workflowRunId": "{{run.id}}",
"nodeId": "publish_x"
}
}
}
}
```
For full posting details, see [OUTBOUND\_POSTING.md](outbound-posting).
#### Other tool names
If a tool node references some other tool name, the runner will try to invoke that tool by name.
Example:
```json theme={null}
{
"id": "some_tool_step",
"kind": "tool",
"assignedTo": { "agentId": "development-team-lead" },
"action": {
"tool": "message",
"args": {
"action": "send",
"channel": "telegram",
"target": "123456",
"message": "Workflow says hello"
}
}
}
```
Whether that works depends on your actual runtime/tool exposure.
### `human_approval`
Purpose:
* pause a workflow until a human approves or rejects
Use it when:
* the workflow might publish externally
* a human needs to review copy or generated content
* the next step is risky enough that you do not want it to happen automatically
Required pieces:
* `assignedTo.agentId`
* `action.approvalBindingId` (or workflow-level fallback metadata that resolves to one)
What it does:
* writes `approvals/approval.json`
* sends an approval request message through the bound messaging target
* changes run status to `awaiting_approval`
* waits until you record a decision
Example:
```json theme={null}
{
"id": "approval",
"kind": "human_approval",
"assignedTo": { "agentId": "development-team-lead" },
"action": {
"approvalBindingId": "marketing-approval"
}
}
```
### `writeback`
Purpose:
* append workflow run information back into one or more workspace files
Use it when:
* you want a durable audit note in `notes/` or `shared-context/`
* you want workflow output to leave a breadcrumb for humans
* you want the run to update a team file after the main work finishes
Required pieces:
* `assignedTo.agentId`
* `action.writebackPaths[]`
What it does:
* appends a stamped workflow note with run/ticket context into the target file(s)
Example:
```json theme={null}
{
"id": "write_summary",
"kind": "writeback",
"assignedTo": { "agentId": "development-team-lead" },
"action": {
"writebackPaths": [
"notes/status.md",
"shared-context/last-run.md"
]
}
}
```
### `media-image`
Purpose:
* generate images using available media generation skills
Use it when:
* you want to create visual content as part of a workflow
* you need to generate images from text prompts
* you want to create marketing visuals or illustrations
Required pieces:
* `assignedTo.agentId`
* either `action.image_prompt` or upstream node output with image prompt
What it does:
* scans available skills for image generation capabilities
* executes image generation via skill auto-discovery
* writes generated image data to node outputs
Example:
```json theme={null}
{
"id": "generate_hero_image",
"kind": "media-image",
"assignedTo": { "agentId": "development-team-lead" },
"action": {
"image_prompt": "A modern, clean illustration of a workflow automation dashboard",
"mediaType": "image"
}
}
```
### `media-video`
Purpose:
* generate video content using available media generation skills
Use it when:
* you want to create video content as part of a workflow
* you need to generate promotional or educational videos
* you want to create dynamic visual content
Required pieces:
* `assignedTo.agentId`
* either `action.video_prompt` or upstream node output with video prompt
What it does:
* scans available skills for video generation capabilities
* executes video generation via skill auto-discovery
* writes generated video data to node outputs
Example:
```json theme={null}
{
"id": "generate_demo_video",
"kind": "media-video",
"assignedTo": { "agentId": "development-team-lead" },
"action": {
"video_prompt": "A 30-second demo of workflow automation in action",
"mediaType": "video"
}
}
```
### `media-audio`
Purpose:
* generate audio content using available media generation skills
Use it when:
* you want to create audio content as part of a workflow
* you need to generate voiceovers or music
* you want to create podcast content or audio narration
Required pieces:
* `assignedTo.agentId`
* either `action.audio_prompt` or upstream node output with audio prompt
What it does:
* scans available skills for audio generation capabilities
* executes audio generation via skill auto-discovery
* writes generated audio data to node outputs
Example:
```json theme={null}
{
"id": "generate_voiceover",
"kind": "media-audio",
"assignedTo": { "agentId": "development-team-lead" },
"action": {
"audio_prompt": "Professional voiceover explaining our new feature launch",
"mediaType": "audio"
}
}
```
***
## What is **not** currently a first-class built-in node type?
People often expect nodes like:
* `if`
* `delay`
* `switch`
* `loop`
Those are **not currently first-class built-in node kinds** in the runner code.
So if you want branching today, use:
* edges (`success`, `error`, `always`)
* multiple nodes
* approval or tool-mediated control flow
If you want waiting/delay behavior today, do it outside the runner with:
* cron triggers
* scheduled reruns
* approval pause/resume
I’m calling this out explicitly so we don’t imply features that do not yet exist as first-class nodes.
***
## Triggers
Triggers answer the question:
**“What causes a workflow run to be created?”**
In the current schema, a workflow may include `triggers[]`.
Current workflow type shape:
```json theme={null}
{
"kind": "cron",
"cron": "0 14 * * 1-5",
"tz": "America/New_York"
}
```
### What is currently supported in the type layer?
* `cron` is the clearly documented trigger kind in the current workflow types
* manual runs are also supported operationally via CLI, even though that is a run-time invocation mode rather than a trigger stored in the workflow file
### Example trigger block
```json theme={null}
{
"id": "weekday-summary",
"triggers": [
{
"kind": "cron",
"cron": "0 14 * * 1-5",
"tz": "America/New_York"
}
],
"nodes": [
{ "id": "start", "kind": "start" },
{ "id": "end", "kind": "end" }
]
}
```
Human translation of that example:
* run on weekdays
* at 2:00 PM
* in New York time
### Manual trigger example
You can always create a run manually:
```bash theme={null}
openclaw recipes workflows run \
--team-id development-team \
--workflow-file weekday-summary.workflow.json
```
***
## Runs
A **run** is one concrete execution of a workflow.
If your workflow is the recipe, the run is the actual cooking session.
### What a run records
A run stores:
* workflow id/name/file
* team id
* run id
* trigger information
* current run status
* node states
* event history
* node results
* ticket/lane context when used
### Common run statuses you will see
Examples include:
* `queued` — the run exists and is waiting to be claimed
* `running` — the runner/worker is actively moving it forward
* `awaiting_approval` — the run is paused for human review
* `completed` — the run finished successfully
* `rejected` — approval was rejected and the run stopped there
* `needs_revision` — a rejection pushed the run back into a revise-and-try-again path
### Where a run lives
```text theme={null}
shared-context/workflow-runs//run.json
```
### What else is inside the run folder?
* `node-outputs/` — output from nodes
* `artifacts/` — tool result payloads
* `approvals/approval.json` — approval state when needed
***
## Where workflow runs live
Every workflow run gets its own folder under:
```text theme={null}
shared-context/workflow-runs/
```
Layout:
```text theme={null}
shared-context/
workflow-runs/
/
run.json
node-outputs/
001-.json
002-.json
artifacts/
approvals/
approval.json
.run.json
```
Important files:
* `run.json` — the canonical run record
* `node-outputs/*.json` — structured output from executed nodes
* `artifacts/` — tool output, payloads, or generated files
* `approvals/approval.json` — approval record when the run is waiting on a human
***
## Edges
Edges define how the workflow graph moves from one node to another.
Current edge shape:
```json theme={null}
{
"from": "draft_post",
"to": "approval",
"on": "success"
}
```
### Supported `on` values
* `success`
* `error`
* `always`
### What they mean
#### `success`
Move to the target node if the source node completed successfully.
```json theme={null}
{ "from": "draft_post", "to": "approval", "on": "success" }
```
#### `error`
Move to the target node if the source node failed.
```json theme={null}
{ "from": "publish_x", "to": "notify_failure", "on": "error" }
```
#### `always`
Move to the target node whether the source node succeeded or failed.
```json theme={null}
{ "from": "publish_x", "to": "write_summary", "on": "always" }
```
### Important current semantics
The current runner behavior is intentionally simple:
* if a node has explicit `input.from`, those dependencies behave like **AND**
* if a node has incoming edges, edge satisfaction behaves like **OR**
* meaning: if **any** incoming edge condition is satisfied, the node can run
Human translation:
* `input.from` is "wait for all of these upstream node outputs"
* incoming edges are "if any of these paths became valid, go ahead"
That is important. Do not assume complex boolean graph semantics unless you have built them explicitly.
### Example: success path + failure path
```json theme={null}
{
"edges": [
{ "from": "draft_post", "to": "approval", "on": "success" },
{ "from": "draft_post", "to": "notify_failure", "on": "error" },
{ "from": "approval", "to": "publish_x", "on": "success" },
{ "from": "publish_x", "to": "write_summary", "on": "always" }
]
}
```
***
## The two moving parts: runner and worker
ClawRecipes splits workflow execution into two roles.
### Runner
The runner is the scheduler.
It:
* claims queued runs
* reads the workflow graph
* decides what node can run next
* enqueues node work for workers
* records state transitions
Useful commands:
```bash theme={null}
openclaw recipes workflows runner-once --team-id development-team
openclaw recipes workflows runner-tick --team-id development-team --concurrency 2
```
### Worker
The worker is the executor.
It:
* pulls queued node tasks for one agent
* runs the node
* writes node output
* updates run state
Useful command:
```bash theme={null}
openclaw recipes workflows worker-tick \
--team-id development-team \
--agent-id development-team-lead
```
***
## Run a workflow manually
If you want to trigger one run yourself:
```bash theme={null}
openclaw recipes workflows run \
--team-id development-team \
--workflow-file marketing.workflow.json
```
This reads the workflow file from:
```text theme={null}
shared-context/workflows/
```
Then you usually follow with runner / worker execution:
```bash theme={null}
openclaw recipes workflows runner-once --team-id development-team
openclaw recipes workflows worker-tick --team-id development-team --agent-id development-team-lead
```
***
## Approval flows
Approval is a first-class workflow state.
When a workflow reaches a human-approval node:
* the run moves to `awaiting_approval`
* ClawRecipes writes `approvals/approval.json`
* the run stops until a decision is recorded
### Approve a run
```bash theme={null}
openclaw recipes workflows approve \
--team-id development-team \
--run-id \
--approved true
```
### Reject a run
```bash theme={null}
openclaw recipes workflows approve \
--team-id development-team \
--run-id \
--approved false \
--note "Rewrite the hook and shorten the post"
```
### Resume a run after approval
```bash theme={null}
openclaw recipes workflows resume \
--team-id development-team \
--run-id
```
### Auto-resume recorded approvals
```bash theme={null}
openclaw recipes workflows poll-approvals \
--team-id development-team \
--limit 20
```
***
## What `run.json` tells you
`run.json` is where you should look first when a workflow behaves strangely.
It records:
* workflow metadata
* current run status
* node state by node id
* timestamps
* append-only event history
* error details when something fails
If you are debugging, read this before guessing.
***
## Common debugging commands
### Inspect recent runs on disk
```bash theme={null}
ls -lah ~/.openclaw/workspace-development-team/shared-context/workflow-runs/
```
### Inspect one run
```bash theme={null}
cat ~/.openclaw/workspace-development-team/shared-context/workflow-runs//run.json
```
### Inspect node outputs
```bash theme={null}
ls ~/.openclaw/workspace-development-team/shared-context/workflow-runs//node-outputs/
cat ~/.openclaw/workspace-development-team/shared-context/workflow-runs//node-outputs/001-some-node.json
```
### Inspect approval record
```bash theme={null}
cat ~/.openclaw/workspace-development-team/shared-context/workflow-runs//approvals/approval.json
```
***
## Posting / publish behavior after install
This matters.
A successful install gives you workflow support, but it does **not** guarantee that workflow publishing side effects are enabled in your environment.
### Recommended supported path
Use the runner-native `outbound.post` tool with a configured outbound posting service.
See: [OUTBOUND\_POSTING.md](outbound-posting)
### Local patched path
If you rely on a controller-local custom posting patch:
* you may need to reapply that patch after install/update
* you may need to tell your assistant to turn workflow posting back on
* RJ's current public gist for the `marketing.post_all` patch is: [https://gist.github.com/rjdjohnston/2440a776529829e7d1c0d5d949f6e631](https://gist.github.com/rjdjohnston/2440a776529829e7d1c0d5d949f6e631)
* Note: Updated for current file structure (`workflow-worker.ts` vs old `workflow-runner.ts`)
So if a workflow runs but does not actually post, check your posting path before blaming the runner.
***
## Typical end-to-end example
This is the operational sequence most people mean when they say, "run the workflow":
```bash theme={null}
# 1) trigger a run
openclaw recipes workflows run \
--team-id development-team \
--workflow-file marketing.workflow.json
# 2) schedule work
openclaw recipes workflows runner-once --team-id development-team
# 3) execute agent work
openclaw recipes workflows worker-tick \
--team-id development-team \
--agent-id development-team-lead
# 4) if approval is required, record a decision
openclaw recipes workflows approve \
--team-id development-team \
--run-id \
--approved true
# 5) resume
openclaw recipes workflows resume \
--team-id development-team \
--run-id
```
***
## End-to-end example: draft → approve → publish
Use this pattern when you want:
* an LLM to draft content
* a human to approve it
* a tool step to publish it only after approval
```json theme={null}
{
"id": "marketing-demo",
"name": "Marketing demo",
"nodes": [
{ "id": "start", "kind": "start" },
{
"id": "draft_post",
"kind": "llm",
"assignedTo": { "agentId": "development-team-lead" },
"action": {
"promptTemplate": "Write a short X post announcing our new workflow system."
}
},
{
"id": "approval",
"kind": "human_approval",
"assignedTo": { "agentId": "development-team-lead" },
"action": {
"approvalBindingId": "marketing-approval"
}
},
{
"id": "publish_x",
"kind": "tool",
"assignedTo": { "agentId": "development-team-lead" },
"action": {
"tool": "outbound.post",
"args": {
"platform": "x",
"text": "Hello from ClawRecipes",
"idempotencyKey": "demo:publish_x"
}
}
},
{ "id": "end", "kind": "end" }
],
"edges": [
{ "from": "start", "to": "draft_post", "on": "success" },
{ "from": "draft_post", "to": "approval", "on": "success" },
{ "from": "approval", "to": "publish_x", "on": "success" },
{ "from": "publish_x", "to": "end", "on": "success" }
]
}
```
# JIGGAI Docs
Source: https://docs.clawkitchen.ai/index
Documentation for ClawRecipes, ClawKitchen, and related JIGGAI products.
## Documentation home
This site is the published docs layer for JIGGAI products.
The long-term system is:
* product docs stay canonical in their home repos
* Mintlify presents those docs in one place
* synced pages are generated into this repo instead of manually copy-pasted
Plugin docs for installation, commands, architecture, recipes, workflows, and file-first operations.
Product docs for Kitchen surfaces, goals, QA access, and future workflow and Mission Control coverage.
## Current state
This repo is being reshaped from the Mintlify starter into a product docs hub.
For now:
* `ClawRecipes/docs/` is the strongest existing canonical source
* `clawkitchen/docs/` is smaller and will grow over time
* `JIGGAIClawDocs` should remain the presentation layer, not a second manual source of truth