AgentRx for Openclaw

AgentRx is a specialized recovery layer that diagnoses AI tool failures and provides agents with actionable instructions to resume execution.

chainassetslab
v1.0.1
Apr 29, 2026
0
796
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install agentrx

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 agentrx 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 AgentRx?

AgentRx acts as a production-grade advisor for AI agents, specifically designed to handle the unpredictable nature of tool calls and API integrations. Within the ecosystem of Openclaw Skills, AgentRx serves as a safety net that classifies error signatures and returns structured recovery suggestions. Whether an agent encounters a timeout, an authentication error, or a hallucinated parameter, this skill provides the intelligence needed to decide between a retry, a schema adjustment, or a human intervention.

By leveraging this skill, developers can build more resilient autonomous systems. The service doesn't just report errors; it interprets them and suggests the most logical next step, such as refreshing credentials or skipping optional tasks. This technical advisory layer ensures that agents using Openclaw Skills can maintain high uptime and operational integrity without requiring constant manual monitoring.

AgentRx Use Cases

  • Automating recovery actions when a web search or API tool returns an unexpected 500 error.
  • Validating high-risk tool payloads for payments or deletions using preflight checks to prevent costly mistakes.
  • Handling authentication expirations by automatically triggering a credential refresh flow.
  • Gracefully escalating complex failures to human operators through the HUMAN_HANDOFF protocol when confidence scores are low.
  • Fixing hallucinated JSON schemas in real-time by applying corrected payloads suggested by the recovery layer.

How AgentRx Works

  1. The AI agent executes a tool that results in a failure, timeout, or an empty/incorrect response.
  2. The agent captures the failure context, including the tool name, error message, and any relevant error codes.
  3. The agent invokes the AgentRx recovery script, transmitting the failure data to the diagnostic service.
  4. AgentRx analyzes the error signature and returns a JSON response containing a suggested instruction, an action type, and a confidence score.
  5. The agent evaluates the suggestion against its safety constraints and task goals to decide if the recovery action should be applied.
  6. If approved, the agent performs the recovery action (e.g., retrying with backoff) and logs the trace ID for future debugging.

AgentRx Setup

To integrate this capability into your environment, configure the necessary environment variables and verify connectivity. This ensures your Openclaw Skills can communicate with the recovery API.

# Define the API credentials and endpoint
export AGENTRX_API_KEY="your_api_key_here"
export AGENTRX_BASE_URL="https://agentrx-production.up.railway.app"

# Verify that the integration is active
curl -s -X GET "${AGENTRX_BASE_URL}/v1/openclaw/status" \
  -H "X-API-Key: ${AGENTRX_API_KEY}" | jq '.'

AgentRx Data Schema & Taxonomy

The skill returns a structured response that allows agents to programmatically parse recovery instructions. The data is organized as follows:

Attribute Description
openclaw_instruction A plain text recovery action for the agent to evaluate.
action_type The category of the recovery (e.g., RETRY_WITH_BACKOFF, RELAX_SCHEMA, HUMAN_HANDOFF).
failure_signature The specific classification of the technical failure detected.
confidence_score A float between 0.0 and 1.0 representing the certainty of the suggestion.
corrected_payload A suggested replacement for the payload if a schema error was detected.
trace_id A unique identifier for server-side log tracing and auditing.

AgentRx Advanced Features

  • Preflight Safety Checks: Validate payloads for high-risk tools before execution to catch errors before they occur.
  • Confidence Thresholding: Automatically pause execution if recovery suggestions fall below a 0.70 confidence score.
  • Traceability: Every recovery attempt generates a unique trace ID, enabling deep audits of how Openclaw Skills handle failures in production.
  • Schema Relaxation: Dynamically corrects malformed JSON payloads to match tool requirements without manual code changes.
  • Intelligent Backoff: Suggests optimal wait times for retries to avoid rate-limiting or cascading failures.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*