Files
openclaw/extensions/llm-task
yunxiafei 89a243be70
Some checks failed
CI / docs-scope (push) Has been cancelled
CI / secrets (push) Has been cancelled
CI / ios (push) Has been cancelled
Docker Release / validate_manual_backfill (push) Has been cancelled
Install Smoke / docs-scope (push) Has been cancelled
Sandbox Common Smoke / sandbox-common-smoke (push) Has been cancelled
Workflow Sanity / no-tabs (push) Has been cancelled
Workflow Sanity / actionlint (push) Has been cancelled
Workflow Sanity / config-docs-drift (push) Has been cancelled
CI / changed-scope (push) Has been cancelled
CI / build-artifacts (push) Has been cancelled
CI / release-check (push) Has been cancelled
CI / checks (pnpm canvas:a2ui:bundle && bunx vitest run --config vitest.unit.config.ts, bun, test) (push) Has been cancelled
CI / checks (pnpm canvas:a2ui:bundle && pnpm test, node, 2, 1, test) (push) Has been cancelled
CI / checks (pnpm canvas:a2ui:bundle && pnpm test, node, 2, 2, test) (push) Has been cancelled
CI / checks (pnpm protocol:check, node, protocol) (push) Has been cancelled
CI / checks (pnpm test:channels, node, channels) (push) Has been cancelled
CI / checks (pnpm test:extensions, node, extensions) (push) Has been cancelled
CI / check (push) Has been cancelled
CI / startup-memory (push) Has been cancelled
CI / check-docs (push) Has been cancelled
CI / compat-node22 (push) Has been cancelled
CI / skills-python (push) Has been cancelled
CI / checks-windows (pnpm test, node, 6, 1, test) (push) Has been cancelled
CI / checks-windows (pnpm test, node, 6, 2, test) (push) Has been cancelled
CI / checks-windows (pnpm test, node, 6, 3, test) (push) Has been cancelled
CI / checks-windows (pnpm test, node, 6, 4, test) (push) Has been cancelled
CI / checks-windows (pnpm test, node, 6, 5, test) (push) Has been cancelled
CI / checks-windows (pnpm test, node, 6, 6, test) (push) Has been cancelled
CI / macos (push) Has been cancelled
CI / android (./gradlew --no-daemon :app:assembleDebug, build) (push) Has been cancelled
CI / android (./gradlew --no-daemon :app:testDebugUnitTest, test) (push) Has been cancelled
Docker Release / approve_manual_backfill (push) Has been cancelled
Docker Release / build-amd64 (push) Has been cancelled
Docker Release / build-arm64 (push) Has been cancelled
Docker Release / create-manifest (push) Has been cancelled
Install Smoke / install-smoke (push) Has been cancelled
初版
2026-03-16 17:22:13 +08:00
..
2026-03-16 17:22:13 +08:00
2026-03-16 17:22:13 +08:00
2026-03-16 17:22:13 +08:00
2026-03-16 17:22:13 +08:00
2026-03-16 17:22:13 +08:00

LLM Task (plugin)

Adds an optional agent tool llm-task for running JSON-only LLM tasks (drafting, summarizing, classifying) with optional JSON Schema validation.

Designed to be called from workflow engines (for example, Lobster via openclaw.invoke --each) without adding new OpenClaw code per workflow.

Enable

  1. Enable the plugin:
{
  "plugins": {
    "entries": {
      "llm-task": { "enabled": true }
    }
  }
}
  1. Allowlist the tool (it is registered with optional: true):
{
  "agents": {
    "list": [
      {
        "id": "main",
        "tools": { "allow": ["llm-task"] }
      }
    ]
  }
}

Config (optional)

{
  "plugins": {
    "entries": {
      "llm-task": {
        "enabled": true,
        "config": {
          "defaultProvider": "openai-codex",
          "defaultModel": "gpt-5.2",
          "defaultAuthProfileId": "main",
          "allowedModels": ["openai-codex/gpt-5.2"],
          "maxTokens": 800,
          "timeoutMs": 30000
        }
      }
    }
  }
}

allowedModels is an allowlist of provider/model strings. If set, any request outside the list is rejected.

Tool API

Parameters

  • prompt (string, required)
  • input (any, optional)
  • schema (object, optional JSON Schema)
  • provider (string, optional)
  • model (string, optional)
  • thinking (string, optional)
  • authProfileId (string, optional)
  • temperature (number, optional)
  • maxTokens (number, optional)
  • timeoutMs (number, optional)

Output

Returns details.json containing the parsed JSON (and validates against schema when provided).

Notes

  • The tool is JSON-only and instructs the model to output only JSON (no code fences, no commentary).
  • No tools are exposed to the model for this run.
  • Side effects should be handled outside this tool (for example, approvals in Lobster) before calling tools that send messages/emails.

Bundled extension note

This extension depends on OpenClaw internal modules (the embedded agent runner). It is intended to ship as a bundled OpenClaw extension (like lobster) and be enabled via plugins.entries + tool allowlists.

It is not currently designed to be copied into ~/.openclaw/extensions as a standalone plugin directory.