Logotipo de Agent Introspection Debugging

Agent Introspection Debugging

Comunidad
VenTheZone
agent-introspection-debugging

Structured self-debugging workflow for AI agent failures using capture, diagnosis, contained recovery, and introspection reports.

Descripción general

EditorVenTheZone
Repositoriopi-dots
Nombre de la habilidadagent-introspection-debugging
Estrellas
41
Forks
0
Archivos incluidos
Solo instrucciones
Enlaces
  • Instrucciones en Markdown

    Un archivo SKILL.md que el modelo carga cuando lo necesita, de modo que solo consume tokens cuando una petición es realmente relevante.

  • Funciona con cualquier LLM

    Las habilidades de IA están en Markdown, no en código específico de un proveedor, por lo que funcionan con GPT, Claude, Gemini, Grok o un modelo local.

  • Todo en las instrucciones

    Todo lo que necesita el modelo está en las instrucciones: no hay archivos adicionales que sincronizar.

  • Código abierto

    Publicada por VenTheZone en GitHub. Revisa el contenido original antes de instalarla.

Instalación

Instala la habilidad de IA Agent Introspection Debugging en TypingMind para usarla con cualquier LLM, o añádela a otro agente que lea SKILL.md.

1

Instalar en TypingMind

TypingMind instala una habilidad directamente desde su carpeta de GitHub: lee SKILL.md, empaqueta los archivos de recursos y guarda el resultado localmente.

  1. Abre la aplicación y ve a Plugins → Habilidades.
  2. Elige «Instalar desde GitHub».
  3. Pega la URL de la carpeta de la habilidad que se muestra a continuación y confirma.
    https://github.com/VenTheZone/pi-dots/tree/main/pi-dotfiles-niche-skills/skills/agent-introspection-debugging
  4. Activa la habilidad en cada chat en el que quieras tenerla disponible.
Plugins → Habilidades → Añadir habilidad → Desde URL de GitHub; después, pega la URL de la carpeta y pulsa Continuar.
2

Instalar en otro agente

Cualquier agente que lea el formato Agent Skills puede usar esta habilidad: copia la carpeta en el directorio de habilidades de ese agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/VenTheZone/pi-dots.git /tmp/pi-dots
mkdir -p .claude/skills
cp -r /tmp/pi-dots/pi-dotfiles-niche-skills/skills/agent-introspection-debugging .claude/skills/agent-introspection-debugging
Reinicia Claude Code después de copiarla para que detecte la nueva habilidad.

Úsala en TypingMind

Activa Agent Introspection Debugging en cualquier chat de TypingMind y el modelo se encargará del resto. Su nombre y descripción se incluyen en el prompt del sistema y, en cuanto una petición es relevante, el modelo carga las instrucciones completas por sí solo. No tienes que invocarla manualmente y no consume tokens hasta que se utiliza.

El modelo carga Agent Introspection Debugging automáticamente en cuanto una petición es relevante para esa habilidad.

Funciona con cualquier modelo de IA

Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que Agent Introspection Debugging no está vinculada al modelo para el que se creó. Instálala una sola vez en TypingMind y úsala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modelo local que ejecutes tú, todo con tus propias claves API.

  • Se carga solo cuando se necesita

    El prompt del sistema solo incluye el nombre y la descripción. Las instrucciones se cargan con la primera petición relevante, por lo que una habilidad que no se usa no supone ningún coste.

  • Cambia de modelo durante el chat

    Como la habilidad contiene instrucciones y no código, cambiar de modelo no impide que funcione: el nuevo modelo lee el mismo archivo SKILL.md.

Instrucciones de la habilidad

Este es el contenido de SKILL.md que carga el modelo. Léelo antes de instalar la habilidad: contiene instrucciones que tu modelo seguirá.

Agent Introspection Debugging

Use this skill when an agent run is failing repeatedly, consuming tokens without progress, looping on the same tools, or drifting away from the intended task.

This is a workflow skill, not a hidden runtime. It teaches the agent to debug itself systematically before escalating to a human.

When to Activate

  • Maximum tool call / loop-limit failures
  • Repeated retries with no forward progress
  • Context growth or prompt drift that starts degrading output quality
  • File-system or environment state mismatch between expectation and reality
  • Tool failures that are likely recoverable with diagnosis and a smaller corrective action

Scope Boundaries

Activate this skill for:

  • capturing failure state before retrying blindly
  • diagnosing common agent-specific failure patterns
  • applying contained recovery actions
  • producing a structured human-readable debug report

Do not use this skill as the primary source for:

  • feature verification after code changes; use verification-loop
  • framework-specific debugging when a narrower ECC skill already exists
  • runtime promises the current harness cannot enforce automatically

Four-Phase Loop

Phase 1: Failure Capture

Before trying to recover, record the failure precisely.

Capture:

  • error type, message, and stack trace when available
  • last meaningful tool call sequence
  • what the agent was trying to do
  • current context pressure: repeated prompts, oversized pasted logs, duplicated plans, or runaway notes
  • current environment assumptions: cwd, branch, relevant service state, expected files

Minimum capture template:

markdown
## Failure Capture
- Session / task:
- Goal in progress:
- Error:
- Last successful step:
- Last failed tool / command:
- Repeated pattern seen:
- Environment assumptions to verify:

Phase 2: Root-Cause Diagnosis

Match the failure to a known pattern before changing anything.

PatternLikely CauseCheck
Maximum tool calls / repeated same commandloop or no-exit observer pathinspect the last N tool calls for repetition
Context overflow / degraded reasoningunbounded notes, repeated plans, oversized logsinspect recent context for duplication and low-signal bulk
ECONNREFUSED / timeoutservice unavailable or wrong portverify service health, URL, and port assumptions
429 / quota exhaustionretry storm or missing backoffcount repeated calls and inspect retry spacing
file missing after write / stale diffrace, wrong cwd, or branch driftre-check path, cwd, git status, and actual file existence
tests still failing after “fix”wrong hypothesisisolate the exact failing test and re-derive the bug

Diagnosis questions:

  • is this a logic failure, state failure, environment failure, or policy failure?
  • did the agent lose the real objective and start optimizing the wrong subtask?
  • is the failure deterministic or transient?
  • what is the smallest reversible action that would validate the diagnosis?

Phase 3: Contained Recovery

Recover with the smallest action that changes the diagnosis surface.

Safe recovery actions:

  • stop repeated retries and restate the hypothesis
  • trim low-signal context and keep only the active goal, blockers, and evidence
  • re-check the actual filesystem / branch / process state
  • narrow the task to one failing command, one file, or one test
  • switch from speculative reasoning to direct observation
  • escalate to a human when the failure is high-risk or externally blocked

Do not claim unsupported auto-healing actions like “reset agent state” or “update harness config” unless you are actually doing them through real tools in the current environment.

Contained recovery checklist:

markdown
## Recovery Action
- Diagnosis chosen:
- Smallest action taken:
- Why this is safe:
- What evidence would prove the fix worked:

Phase 4: Introspection Report

End with a report that makes the recovery legible to the next agent or human.

markdown
## Agent Self-Debug Report
- Session / task:
- Failure:
- Root cause:
- Recovery action:
- Result: success | partial | blocked
- Token / time burn risk:
- Follow-up needed:
- Preventive change to encode later:

Recovery Heuristics

Prefer these interventions in order:

  1. Restate the real objective in one sentence.
  2. Verify the world state instead of trusting memory.
  3. Shrink the failing scope.
  4. Run one discriminating check.
  5. Only then retry.

Bad pattern:

  • retrying the same action three times with slightly different wording

Good pattern:

  • capture failure
  • classify the pattern
  • run one direct check
  • change the plan only if the check supports it

Integration with ECC

  • Use verification-loop after recovery if code was changed.
  • Use continuous-learning-v2 when the failure pattern is worth turning into an instinct or later skill.
  • Use council when the issue is not technical failure but decision ambiguity.
  • Use workspace-surface-audit if the failure came from conflicting local state or repo drift.

Output Standard

When this skill is active, do not end with “I fixed it” alone.

Always provide:

  • the failure pattern
  • the root-cause hypothesis
  • the recovery action
  • the evidence that the situation is now better or still blocked

Preguntas frecuentes

¿Qué hace la habilidad de IA Agent Introspection Debugging?

Structured self-debugging workflow for AI agent failures using capture, diagnosis, contained recovery, and introspection reports.

¿Por qué usar Agent Introspection Debugging en TypingMind?

Porque la instalas una vez y la usas con cualquier modelo. Agent Introspection Debugging está escrita en Markdown, no en código específico de un proveedor, por lo que la misma habilidad funciona con GPT-5, Claude, Gemini, Grok o un modelo local, y puedes cambiar de modelo en mitad del chat sin que deje de funcionar. TypingMind utiliza tus propias claves API, de modo que pagas directamente a los proveedores en lugar de pagar una suscripción por puesto, y tus habilidades y chats permanecen en tu propio almacenamiento.

¿Cómo instalo Agent Introspection Debugging en TypingMind?

Abre Plugins → Habilidades → Instalar desde GitHub en TypingMind y pega https://github.com/VenTheZone/pi-dots/tree/main/pi-dotfiles-niche-skills/skills/agent-introspection-debugging. TypingMind lee su archivo SKILL.md y la instala como una habilidad que puedes activar en cada chat.

¿Qué modelos de IA pueden usar Agent Introspection Debugging?

Cualquier modelo que conectes en TypingMind. Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que GPT, Claude, Gemini, Grok y los modelos locales pueden cargar esta habilidad cuando una solicitud se corresponda con ella.

¿Con cuántos modelos de IA puedo usar Agent Introspection Debugging?

Con tantos como quieras. Siempre que un modelo admita habilidades, puedes usar Agent Introspection Debugging con él: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama y muchos más, todos en TypingMind con tus propias claves API.

¿Es gratuita la habilidad de IA Agent Introspection Debugging?

VenTheZone la ha publicado en GitHub. Consulta el repositorio para conocer las condiciones de la licencia. Solo pagas a tu proveedor de IA por los tokens que utilizas.

¿Qué son las habilidades de IA?

Una habilidad de IA es un conjunto de instrucciones reutilizables que enseña a un modelo de IA a realizar una tarea concreta. Sigue el formato abierto Agent Skills: un archivo SKILL.md con un nombre y una descripción, además de los scripts, plantillas o archivos de referencia que pueda necesitar el modelo. El modelo solo lee las instrucciones cuando tu solicitud se corresponde con la habilidad, por lo que una habilidad instalada no supone ningún coste hasta que se utiliza.

¿En qué se diferencian las habilidades de IA de los plugins o los servidores MCP?

Un plugin o un servidor MCP proporciona al modelo nuevas herramientas que puede invocar: código que se ejecuta en algún lugar y devuelve un resultado. En cambio, una habilidad de IA aporta conocimientos y procedimientos al modelo: cómo abordar una tarea, qué pasos seguir y qué se considera un buen resultado. Las habilidades son instrucciones en Markdown, por lo que no necesitan servidor, clave API ni entorno de ejecución, y funcionan con cualquier modelo.

Ver todos

Crea ya tu propio espacio de trabajo IA

Suscríbete a nuestro boletín para recibir avisos sobre nuevas funciones y próximos sorteos 👇