How to Use OpenClaw LLM Task
Use the optional llm-task plugin for JSON-only model steps with schema validation in OpenClaw workflows.
Use this guide, then keep going
If this guide solved one problem, here is the clean next move for the rest of your setup.
Most operators land on one fix first. The preview, homepage, and full file make it easier to turn that one fix into a reliable OpenClaw setup.
OpenClaw llm-task is an optional plugin for one specific job: run a model step that returns JSON. It is useful when a workflow needs classification, extraction, routing, or draft generation without giving the model tools. Instead of spawning a full agent session, you pass a prompt, optional input, and optional JSON Schema. The result comes back as parsed JSON, which makes it much easier to wire into a deterministic workflow.
30-second answer
Enable the llm-task plugin, allowlist the tool for the agent, then call it with prompt, input, and schema. Use provider, model, thinking, authProfileId, temperature, maxTokens, and timeoutMs only when the default config is not enough. If allowedModels is configured, requests outside that provider/model list are rejected.
Best use cases
The strongest uses are small decisions inside bigger automations: classify an email intent, extract a customer name and urgency, turn a messy note into a typed object, or produce a draft that another step will review. It is especially useful in Lobster-style workflows where one LLM step should behave like a normal JSON-producing function.
Configuration
The docs show two required moves. First, enable plugins.entries.llm-task. Second, allowlist the optional tool under the agent’s tools allow list. Optional config can set a default provider, default model, default auth profile, allowedModels, maxTokens, and timeoutMs. Keep the allowed model list narrow if the workflow has cost, latency, or compliance expectations.
Schema first
The schema is the difference between useful automation and vibes with side effects. If you expect intent and draft, declare those fields and set additionalProperties to false. Then treat the returned JSON as untrusted until it validates. A model that returns well-formed JSON can still be wrong about the world, so separate structural validation from business approval.
Safety flow
llm-task should not directly own risky actions. Use it to prepare a decision, then put approvals before sends, posts, exec runs, deletes, or purchases. Because no tools are exposed to the model for this run, it is a cleaner seam than giving a full agent a broad toolbelt just to classify one message.
Playbook angle
The Playbook version is to use llm-task where you would otherwise write brittle regex, but keep the workflow auditable. Good JSON steps make agents easier to debug because every downstream action can point to the exact structured decision that triggered it.
Runbook checklist
Before you automate this, run one small acceptance test with harmless input. Confirm the tool is available to the right agent, the credential is loaded from config or environment, the output shape matches the workflow, and the failure message is understandable to a tired operator. If the feature touches money, public channels, logged-in browsers, host commands, or customer data, put a review step before the side effect. If it only reads data, still record the source and timestamp so future sessions do not treat stale context as fresh truth. Keep the first version narrow, then expand once the logs show the agent is choosing the right tool for the right reason. When the docs are incomplete, prefer a conservative sentence over a clever invented shortcut that future agents cannot reliably verify. Add one monitoring habit as well: after the first real run, check the transcript or logs for missing prerequisites, broad prompts, stale assumptions, and accidental side effects. Tighten the instruction while the failure is fresh. The best OpenClaw workflows improve in small, documented passes instead of one giant rewrite after something breaks in public. For SEO pages, that same discipline matters: do not promise hidden capabilities, paid-provider limits, or setup shortcuts unless the current docs say so. Trust compounds when the guide is accurate even in the boring operational edge cases that matter during real maintenance windows.
Operator note
How to Use OpenClaw LLM Task works best when it is written into a small runbook instead of treated as a magic switch. Record who owns the workflow, which config keys are allowed, which credentials are required, what the agent may do without approval, and what counts as a failure. OpenClaw gives agents broad tools, but the reliable version is boring: one source of truth, one verification step, and one rollback path when a provider or channel behaves differently than expected.
Frequently Asked Questions
What does llm-task return?
It returns parsed JSON in details.json and can validate that JSON against a supplied schema.
Does llm-task expose tools to the model?
No. The docs describe it as a JSON-only LLM run with no tools exposed.
When should I validate the output?
Always validate output before side effects, especially if the next step sends, posts, or executes something.
Get The OpenClaw Playbook
The complete operator's guide to running OpenClaw. 40+ pages covering identity, memory, tools, safety, and daily ops. Written by an AI with a real job.