Caricamento in corso...
Caricamento in corso...
Last synced: Today, 22:00
Technical reference for the OpenClaw framework. Real-time synchronization with the official documentation engine.
Use this file to discover all available pages before exploring further.
Lobster is a workflow shell that lets OpenClaw run multi-step tool sequences as a single, deterministic operation with explicit approval checkpoints.
Lobster is one authoring layer above detached background work. For flow orchestration above individual tasks, see Task Flow (
openclaw tasks flowopenclaw tasksYour assistant can build the tools that manage itself. Ask for a workflow, and 30 minutes later you have a CLI plus pipelines that run as one call. Lobster is the missing piece: deterministic pipelines, explicit approvals, and resumable state.
Today, complex workflows require many back-and-forth tool calls. Each call costs tokens, and the LLM has to orchestrate every step. Lobster moves that orchestration into a typed runtime:
Lobster is intentionally small. The goal is not "a new language," it's a predictable, AI-friendly pipeline spec with first-class approvals and resume tokens.
.lobsterOpenClaw runs Lobster workflows in-process using an embedded runner. No external CLI subprocess is spawned; the workflow engine executes inside the gateway process and returns a JSON envelope directly. If the pipeline pauses for approval, the tool returns a
resumeTokenBuild tiny commands that speak JSON, then chain them into a single Lobster call. (Example command names below — swap in your own.)
bashinbox list --json inbox categorize --json inbox apply --json
json{ "action": "run", "pipeline": "exec --json --shell 'inbox list --json' | exec --stdin json --shell 'inbox categorize --json' | exec --stdin json --shell 'inbox apply --json' | approve --preview-from-stdin --limit 5 --prompt 'Apply changes?'", "timeoutMs": 30000 }
If the pipeline requests approval, resume with the token:
json{ "action": "resume", "token": "<resumeToken>", "approve": true }
AI triggers the workflow; Lobster executes the steps. Approval gates keep side effects explicit and auditable.
Example: map input items into tool calls:
bashgog.gmail.search --query 'newer_than:1d' \ | openclaw.invoke --tool message --action send --each --item-key message --args-json '{"provider":"telegram","to":"..."}'
For workflows that need a structured LLM step, enable the optional
llm-taskEnable the tool:
json{ "plugins": { "entries": { "llm-task": { "enabled": true } } }, "agents": { "list": [ { "id": "main", "tools": { "allow": ["llm-task"] } } ] } }
Use it in a pipeline:
lobsteropenclaw.invoke --tool llm-task --action json --args-json '{ "prompt": "Given the input email, return intent and draft.", "thinking": "low", "input": { "subject": "Hello", "body": "Can you help?" }, "schema": { "type": "object", "properties": { "intent": { "type": "string" }, "draft": { "type": "string" } }, "required": ["intent", "draft"], "additionalProperties": false } }'
See LLM Task for details and configuration options.
Lobster can run YAML/JSON workflow files with
nameargsstepsenvconditionapprovalpipelineyamlname: inbox-triage args: tag: default: "family" steps: - id: collect command: inbox list --json - id: categorize command: inbox categorize --json stdin: $collect.stdout - id: approve command: inbox apply --approve stdin: $categorize.stdout approval: required - id: execute command: inbox apply --execute stdin: $categorize.stdout condition: $approve.approved
Notes:
stdin: $step.stdoutstdin: $step.jsonconditionwhen$step.approvedBundled Lobster workflows run in-process; no separate
lobsterIf you need the standalone Lobster CLI for development or external pipelines, install it from the Lobster repo and ensure
lobsterPATHLobster is an optional plugin tool (not enabled by default).
Recommended (additive, safe):
json{ "tools": { "alsoAllow": ["lobster"] } }
Or per-agent:
json{ "agents": { "list": [ { "id": "main", "tools": { "alsoAllow": ["lobster"] } } ] } }
Avoid using
tools.allow: ["lobster"]Without Lobster:
textUser: "Check my email and draft replies" → openclaw calls gmail.list → LLM summarizes → User: "draft replies to #2 and #5" → LLM drafts → User: "send #2" → openclaw calls gmail.send (repeat daily, no memory of what was triaged)
With Lobster:
json{ "action": "run", "pipeline": "email.triage --limit 20", "timeoutMs": 30000 }
Returns a JSON envelope (truncated):
json{ "ok": true, "status": "needs_approval", "output": [{ "summary": "5 need replies, 2 need action" }], "requiresApproval": { "type": "approval_request", "prompt": "Send 2 draft replies?", "items": [], "resumeToken": "..." } }
User approves → resume:
json{ "action": "resume", "token": "<resumeToken>", "approve": true }
One workflow. Deterministic. Safe.
runRun a pipeline in tool mode.
json{ "action": "run", "pipeline": "gog.gmail.search --query 'newer_than:1d' | email.triage", "cwd": "workspace", "timeoutMs": 30000, "maxStdoutBytes": 512000 }
Run a workflow file with args:
json{ "action": "run", "pipeline": "/path/to/inbox-triage.lobster", "argsJson": "{\"tag\":\"family\"}" }
resumeContinue a halted workflow after approval.
json{ "action": "resume", "token": "<resumeToken>", "approve": true }
cwdtimeoutMsmaxStdoutBytesargsJsonlobster run --args-jsonLobster returns a JSON envelope with one of three statuses:
okneeds_approvalrequiresApproval.resumeTokencancelledThe tool surfaces the envelope in both
contentdetailsIf
requiresApprovalapprove: trueapprove: falseUse
approve --preview-from-stdin --limit NOpenProse pairs well with Lobster: use
/proselobstertools.subagents.toolslobster timed outtimeoutMslobster output exceeded maxStdoutBytesmaxStdoutByteslobster returned invalid JSONlobster failedOne public example: a “second brain” CLI + Lobster pipelines that manage three Markdown vaults (personal, partner, shared). The CLI emits JSON for stats, inbox listings, and stale scans; Lobster chains those commands into workflows like
weekly-reviewinbox-triagememory-consolidationshared-task-sync© 2024 TaskFlow Mirror
Powered by TaskFlow Sync Engine