Repository navigation
Conversation
Replace NOTE/workaround comments with actual prompt steps: - daily-news-digest: summarize-digest prompt replaces jq formatter - competitor-shadow: analyze-changes prompt replaces raw change list - standup-notes: generate-standup prompt replaces grep-based extraction - x-audio-brief: generate-script prompt replaces jq script generator All use llm:host by default (agent's own model, zero config). Requires Lobster PR #6 (openclaw/lobster/pull/6) to be merged.
Replace all NOTE/workaround comments with actual prompt steps. 27 workflows converted. All use llm:host by default. Requires Lobster PR #6 (openclaw/lobster/pull/6).
Adds a prompt step type that delegates LLM calls to the calling agent
via halt/resume — the same pattern as approve.
How it works:
1. Lobster runs deterministic shell steps
2. Hits a prompt step → halts
3. Returns status: needs_llm with prompt, system, context, resume token
4. Agent fulfills the prompt with its own model (Opus, Sonnet, etc.)
5. Agent calls: lobster resume --token X --llm-response "..."
6. Lobster continues with remaining steps
No API keys. No HTTP calls. No new dependencies.
New step fields:
- prompt (string) — user prompt, supports $step refs and ${args}
- system (string?) — optional system prompt
A step must have either command OR prompt, never both.
Design decisions:
- Reuses the approve halt/resume pattern — no new primitives
- Host-only — agent's own model handles the prompt
- stdin → context — previous step output becomes LLM context
- Same output contract — $step.stdout and $step.json work identically
- Mutual exclusion — command OR prompt, never both
Tests: 57/57 pass (10 new)
a8704cc to
a33a030
Compare
- Human mode now prints LLM request and resume instructions instead of silently exiting - Validate that --llm-response and --approve match the resume state type - Add requiresApproval: null to writeLlmEnvelope for envelope consistency - Add test for --llm-response=value form - Add note to example about search-x skill requirement
|
@vignesh07, when you have time can you please take a look at this pull request? It will really help me advance some of my Lobster workflows, making them be LLM smart... |
|
@vignesh07 Thanks for catching the package-lock.json issue and pushing the fix! Good lesson learned on my end — will check the repo's package manager before running installs in the future. Is the PR good to merge now, or is there anything else you'd like me to address? |
|
we already have an llm-task tool. Is that not sufficient for your use case? Are you trying to use this with other models outside of openclaw? |
|
Invoking the llm-task tool from a lobster pipeline is currently quite difficult, largely due to JSON escaping issues when using openclaw.invoke as a shell command. I think it makes sense to add first-class support for llm-task calls directly in the .lobster workflow format. This would streamline the process and allow us to specify things like AJV validation schemas natively. At a minimum, we should add richer examples of llm-task tool calls to the documentation. Currently, the only reference to openclaw.invoke is in the lobster/llm-task docs, which makes adoption harder. here are all references i can see for openclaw.invoke: |
|
@vignesh07 You're absolutely right — I didn't realize This PR was unnecessary — my apologies for not checking the existing commands more thoroughly before building a new primitive. Feel free to close it. Thanks for pointing this out and for the great work on |
Summary
Adds a
promptstep type that delegates LLM calls to the calling agent via halt/resume — the same pattern asapprove.How it works
promptstep → haltsstatus: needs_llmwith the prompt, system prompt, context, and resume tokenlobster resume --token X --llm-response "..."No API keys. No HTTP calls. No new dependencies. Uses your existing model.
Example workflow
New step fields
prompt$steprefs and${args})systemA step must have either
commandORprompt, never both.Resume
New CLI flag:
--llm-responseon the resume command:Validation:
Design decisions
approvehalt/resume pattern — no new primitives needed$step.stdoutand$step.jsonwork identically to command stepscommandORprompt, never bothTests
57/57 pass (10 new):
needs_llmwith prompt + system + context${arg}resolution in prompt templates--llm-responsevalue, empty response, whitespace-only responseFiles changed
src/workflows/file.ts— prompt step type,isPromptStep(), halt/resume logicsrc/resume.ts—--llm-responseflag with validationsrc/cli.ts—needs_llmstatus handling,writeLlmEnvelopehelpertest/llm_prompt_step.test.ts— 10 testsexamples/x-audio-brief.lobster— example workflow (search + summarize)