Skip to content

docs: add detailed llm-task examples and common mistakes (fixes #26)#31

Open
Bandwe wants to merge 1 commit intoopenclaw:mainfrom
Bandwe:main
Open

docs: add detailed llm-task examples and common mistakes (fixes #26)#31
Bandwe wants to merge 1 commit intoopenclaw:mainfrom
Bandwe:main

Conversation

@Bandwe
Copy link

@Bandwe Bandwe commented Mar 13, 2026

Summary

This PR addresses #26 by adding comprehensive documentation for calling OpenClaw tools from Lobster workflows, specifically focusing on llm-task usage.

Changes

  • Complete workflow example: Added a real-world Jira + LLM summary workflow
  • Syntax clarification: Documented the correct openclaw.invoke syntax
  • Common mistakes section: Added clear comparison of wrong vs correct approaches

Motivation

The issue author struggled with unclear syntax for tool calling in workflows and how to pipe LLM output to next steps.

This PR provides copy-paste-ready examples that work out of the box.

…law#26)

- Add complete Jira + LLM summary workflow example
- Document correct openclaw.invoke syntax
- Add common mistakes section to avoid confusion
- Clarify stdin piping vs env var approaches
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9df918e4d2

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

- id: summarize
env:
# Pass tickets via env var to avoid shell escaping issues
TICKETS_JSON: "$LOBSTER_ARG_TICKETS"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Use step output instead of undefined tickets arg

The daily-standup example says it summarizes tickets fetched in list-tickets, but summarize sets TICKETS_JSON from LOBSTER_ARG_TICKETS even though the workflow defines only team, project, and limit args. In this form, the summarize step does not receive the previous step’s ticket payload, so copy-pasting this example will not actually summarize fetched Jira tickets.

Useful? React with 👍 / 👎.

TICKETS_JSON: "$LOBSTER_ARG_TICKETS"
command: >
openclaw.invoke --tool llm-task --action json --args-json
'{"prompt": "Summarize the top 5 most urgent tickets for the daily standup: $TICKETS_JSON"}'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Allow shell expansion of ticket payload in prompt

The --args-json value is single-quoted, so /bin/sh treats $TICKETS_JSON as a literal string instead of expanding the environment variable. As written, llm-task receives the text $TICKETS_JSON in the prompt rather than the ticket JSON, so the documented workflow cannot produce the intended summary.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant