LLM Agent for Openclaw

Build OpenAI-compatible LLM agents on Runware that can reason, call your functions, and answer with grounded tool results.

runware
v1.0.0
Jul 18, 2026
0
429
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install llm-agent

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install llm-agent using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is LLM Agent?

Openclaw Skills for LLM Agent turns Runware-hosted models into chat assistants and tool-using agents that can reason across multiple steps, call your APIs, and incorporate the returned JSON into the final answer. It uses the standard OpenAI chat-completions and tool-calling pattern, so existing OpenAI client code and agent frameworks can connect to Runware with minimal changes.

This skill is designed for developers who need a model that can interact with their own systems without direct system access. You define the tools, constrain the schema, choose a live AIR model, and let the agent loop until it stops calling tools. The result is a reliable Openclaw Skills workflow for database lookups, search, orchestration, and other multi-step tasks.

LLM Agent Use Cases

  • Building a chat assistant that can call internal APIs, search services, or database endpoints.
  • Letting a model gather context before acting, or act immediately based on the system prompt policy.
  • Multi-step reasoning tasks that require reading tool results and making another decision.
  • High-volume or latency-sensitive agents that should route to faster models like Claude Sonnet 4.6.
  • Long-context, tool-rich workflows that benefit from Gemini 3.1 Pro, Claude Opus 4.8, or Qwen3.5-397B.
  • Migrating an existing OpenAI-compatible agent to Runware-hosted models without rewriting the loop.

How LLM Agent Works

  1. Gather the job, the tools, the system prompt, and any constraints such as latency, cost, or context-window needs.
  2. Point an OpenAI-compatible client at https://api.runware.ai/v1, choose a live AIR model or slug, and send the conversation plus the tools array.
  3. Let the model return either text or tool_calls. When tool calls appear, parse function.arguments as a JSON string and execute the corresponding functions.
  4. Append the assistant message and one tool message per call, making sure each tool_call_id matches the call id. If multiple tool calls arrive in one turn, process them all and continue the loop.
  5. Repeat until finish_reason is stop, then return the final answer. Keep the loop bounded with an iteration cap so the agent cannot run forever.
  6. Route by sub-task when needed: use stronger reasoning models for complex planning and faster tiers for cheap or high-volume calls.

LLM Agent Setup

  • Export your Runware key and OpenAI-compatible endpoint.
export RUNWARE_API_KEY="your-runware-api-key"
export OPENAI_BASE_URL="https://api.runware.ai/v1"
export OPENAI_MODEL="google:[email protected]"
  • Verify the model is live and inspect its schema before production use.
runware-models
runware-run
  • Wire any OpenAI-compatible SDK to https://api.runware.ai/v1 and set model to a live AIR or slug.
  • Define each function tool with a strict JSON Schema: use required, enum, and narrow argument shapes.
  • Keep the system prompt and tool list stable across turns to improve prompt caching.
  • Implement a bounded tool loop that parses function.arguments, executes the function, and appends a matching tool message.
  • Return tool failures as JSON objects like { error: ... } so the model can recover instead of crashing the loop.

LLM Agent Data Schema & Taxonomy

Openclaw Skills for LLM Agent is request-scoped; it does not require generated project files by default. The runtime data model is a chat-completions envelope with tools and tool results.

Entity Shape Purpose
model AIR / slug + live status Selects the Runware-hosted LLM and confirms it is runnable.
messages Array of system, user, assistant, and tool messages Carries the conversation and preserves every tool round-trip.
tools Array of { type: function, function: { name, description, parameters } } Exposes tightly scoped tool schemas to the model.
tool_calls Array of calls with id, type, function.name, and JSON-string function.arguments Represents every requested function invocation.
tool message { role: tool, tool_call_id, content } Returns compact JSON or { error: ... } back to the model.
Control metadata tool_choice, temperature, max_completion_tokens, iteration cap Governs autonomy, determinism, and loop safety.
Usage metadata finish_reason, usage.prompt_tokens_details.cached_tokens Tracks loop termination and prompt-cache reuse.

Recommended taxonomy: prompt, tools, loop_state, tool_results, model_selection, and usage. Persist transcripts as JSONL or request/response logs only if you need audits or replay.

LLM Agent Advanced Features

  • OpenAI-compatible drop-in support for existing OpenAI agent code and frameworks.
  • Parallel tool calls in a single assistant response, with independent tool_call_id matching.
  • tool_choice routing for auto, none, required, or a named function when the action is predetermined.
  • Prompt-cache-friendly execution by keeping the system prompt and tool definitions as a stable prefix.
  • Model routing by sub-task, letting you pick stronger reasoning or lower latency without changing the loop.
  • Error-aware tool execution that returns { error: ... } instead of throwing, so the agent can recover.
  • Bounded autonomy with explicit iteration caps to prevent open-ended loops.
  • Live model validation via AIR, runware-models, and runware-run before shipping.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*