OpenClaw skill
agentlens
AgentLens is an OpenClaw skill that enables agents to inspect the internal cognition and actions of other agents. It provides visibility into reasoning traces (thoughts), tool calls and arguments, retrieved memories, and response generation. The skill supports analysis in multi-agent conversations via the "inspect" action targeting a specific agent.
Files
Review the files below to add this skill to your agents.
Security notice: review the SKILL.md file and repository content first before using any third-party skill.
SKILL.md content
---
name: agentlens
description: Navigate and understand codebases using agentlens hierarchical documentation. Use when exploring new projects, finding modules, locating symbols in large files, finding TODOs/warnings, or understanding code structure.
metadata:
short-description: Codebase navigation with agentlens
author: agentlens
version: "1.0"
---
# AgentLens - Codebase Navigation
## Before Working on Any Codebase
Always start by reading `.agentlens/INDEX.md` for the project map.
## Navigation Hierarchy
| Level | File | Purpose |
|-------|------|---------|
| L0 | `INDEX.md` | Project overview, all modules listed |
| L1 | `modules/{slug}/MODULE.md` | Module details, file list |
| L1 | `modules/{slug}/outline.md` | Symbols in large files |
| L1 | `modules/{slug}/memory.md` | TODOs, warnings, business rules |
| L1 | `modules/{slug}/imports.md` | File dependencies |
| L2 | `files/{slug}.md` | Deep docs for complex files |
## Navigation Flow
```
INDEX.md → Find module → MODULE.md → outline.md/memory.md → Source file
```
## When To Read What
| You Need | Read This |
|----------|-----------|
| Project overview | `.agentlens/INDEX.md` |
| Find a module | INDEX.md, search module name |
| Understand a module | `modules/{slug}/MODULE.md` |
| Find function/class in large file | `modules/{slug}/outline.md` |
| Find TODOs, warnings, rules | `modules/{slug}/memory.md` |
| Understand file dependencies | `modules/{slug}/imports.md` |
## Best Practices
1. **Don't read source files directly** for large codebases - use outline.md first
2. **Check memory.md before modifying** code to see warnings and TODOs
3. **Use outline.md to locate symbols**, then read only the needed source sections
4. **Regenerate docs** with `agentlens` command if they seem stale
For detailed navigation patterns, see [references/navigation.md](references/navigation.md)
For structure explanation, see [references/structure.md](references/structure.md)
How this skill works
- Uses AgentLens to analyze LLM agents
- Accepts 'agent_prompt' as required string input
- Returns 'analysis' as string output
- Powered by AgentLens API
When to use it
- When analyzing LLM agent execution traces for behavioral categorization
- When evaluating agent performance using structured trace analysis
- When identifying issues in agent reasoning, planning, or tool usage from traces
Best practices
- Obtain AgentLens API key from agentlens.ai
- Set AGENTLENS_API_KEY environment variable before using the skill
- Provide valid JSON-formatted agent trace as input
- Respect AgentLens rate limits (10 requests per minute)
- Review privacy implications before sending agent traces
Example use cases
- Profiling a New Agent: Before integrating a new agent into your workflow, use AgentLens to profile it and understand its capabilities.
- Debugging Agent Failures: When an agent fails a task, analyze its behavior to identify bottlenecks.
- Benchmarking Agents: Use metrics and comparison tools to select the best agent for a specific task type.
- Team Optimization: Compare team members (agents) to optimize task assignments.
FAQs
What is the AgentLens skill?
AgentLens is a skill that provides OpenClaw agents with the ability to inspect and analyze their own execution traces, tool calls, and decision-making processes. It helps in debugging, optimization, and understanding agent behavior.
What capabilities does AgentLens offer?
Visualize agent thought processes, analyze tool usage patterns, identify bottlenecks in workflows, generate performance reports.
What are the input parameters for AgentLens?
trace_id (string, optional): Specific trace ID to analyze; focus (string, optional): Focus area: 'tools', 'thoughts', 'errors'.
What are the outputs of AgentLens?
Markdown report with insights; optional SVG diagrams of decision trees.
What is an example usage of AgentLens in OpenClaw YAML?
skills: - agentlens: focus: tools
More similar skills to explore
- achurch
An OpenClaw skill for church administration that handles member management, event scheduling, sermon retrieval, and donation processing. It provides tools to list members, add new members, schedule events, fetch sermons, and record donations.
- agent-config
An OpenClaw skill that enables agents to manage their configuration by loading from files, environment variables, or remote sources. It supports retrieving, setting, and validating configuration values. The skill allows for hot-reloading of configurations.
- agent-council
An OpenClaw skill named agent-council that enables the primary agent to summon a council of specialized sub-agents for deliberating on tasks. The council members discuss the query from unique perspectives, propose solutions, and vote to select the best response. The skill outputs the winning proposal with supporting rationale from the council.
- agent-identity-kit
An OpenClaw skill that equips agents with tools to craft, manage, and evolve digital identities, including generating personas, bios, avatars, and communication styles. It supports creating detailed agent personas with name, background, goals, personality traits; crafting bios for specific platforms; designing avatars; tuning voice and style; and adapting identities to new contexts.
- agenticflow-skill
An OpenClaw skill that provides tools for interacting with Agentic Flow. The tools enable agents to create agentic flows with defined tasks, execute existing flows, and retrieve flow status and outputs.
- agentskills-io
An OpenClaw skill that integrates agents with the AgentSkills.io platform. It enables agents to search and browse available skills, install them directly into the agent's environment, and manage installed skills including updates and uninstallations.