Agent Debugger for Openclaw

A systematic debugging framework designed to identify and resolve AI agent failures, infinite loops, and resource bottlenecks.

engsathiago
v1.0.0
Mar 17, 2026
0
886
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install agent-debugger

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 agent-debugger 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 Agent Debugger?

Agent Debugger is a specialized toolset within the Openclaw Skills library built to handle the unique challenges of AI agent development. It provides a structured approach to diagnosing common autonomous agent issues such as context overflow, rate limiting, and permission errors. By implementing these debugging protocols, developers can ensure their agents remain reliable, efficient, and capable of recovering from unexpected tool failures or logic loops.

This skill serves as an essential companion for anyone building complex agentic workflows, offering both diagnostic patterns and concrete code snippets for remediation. Whether you are dealing with a stuck reasoning chain or fragmented memory, Agent Debugger provides the technical guardrails needed to stabilize agent performance and optimize token consumption.

Agent Debugger Use Cases

  • Resolving infinite loops where an agent repeats the same tool call or output pattern.
  • Debugging tool failures caused by schema mismatches, missing permissions, or API timeouts.
  • Managing context overflow and 'context length exceeded' errors in long-running conversations.
  • Implementing exponential backoff and request queuing to handle provider rate limits.
  • Fixing memory issues where an agent loses track of prior decisions or fails to load MEMORY.md.

How Agent Debugger Works

  1. Reproduce: Document the exact steps and inputs that trigger the misbehavior or error.
  2. Isolate: Simplify the task, disable unnecessary Openclaw Skills, and minimize context to find the specific point of failure.
  3. Diagnose: Analyze logs, check current token usage, and verify tool configuration settings.
  4. Fix: Apply corrective measures such as adding iteration limits, retry logic, or context compression.
  5. Prevent: Update agent instructions with new guardrails and document the resolution in the agent's memory to avoid recurrence.

Agent Debugger Setup

To begin using the debugging protocols provided by this skill, ensure your workspace is correctly configured for Openclaw Skills development:

# Verify your workspace structure
ls -la ~/.openclaw/workspace/

# Ensure memory files are present
touch ~/.openclaw/workspace/MEMORY.md

Configure your agent with verbose thinking to expose internal reasoning during the debug phase:

{
  "thinking": "verbose",
  "reasoning": "on"
}

Agent Debugger Data Schema & Taxonomy

The Agent Debugger utilizes a structured approach to categorize and track agent errors. Below is the primary error mapping used by the skill:

Error Code Primary Cause Remediation Strategy
context_length_exceeded Excessive history/file data Summarization & Truncation
rate_limit_exceeded API frequency limits Backoff & Queuing
tool_not_found Registry mismatch Installation & Path Check
permission_denied Sandbox restrictions Policy Adjustment
invalid_parameters Schema violation Input Validation

Agent Debugger Advanced Features

  • Iteration Limits: Define maxIterations and onLimit behaviors to break infinite loops automatically.
  • Adaptive Context Compression: Dynamically use offsets and limits for large file reads to prevent context overflow.
  • Custom Retry Logic: Implement granular retry strategies specifically for 5xx errors or timeouts.
  • Parallel Tool Optimization: Combine multiple read operations into single calls to reduce latency.
  • Checkpointing: Periodically save agent state to allow resumes during long-running tasks.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*