reflexion

Capture task failures, generate root-cause reflections, and retry with stored learnings.

Updated Feb 7, 2026
One-click install
npx skills add https://github.com/mohitmishra786/aurora-dev --skill reflexion-mohitmishra786
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: reflexion
Source: https://github.com/mohitmishra786/aurora-dev/tree/main/.agents/skills/reflexion
Command: npx skills add https://github.com/mohitmishra786/aurora-dev --skill reflexion-mohitmishra786

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill enables AI agents to learn from their mistakes, identify root causes of failure, and improve their performance over time, leading to more robust and reliable autonomous systems.

Core Features & Use Cases

  • Failure Capture: Records all details of a failed task attempt, including errors, code, and metrics.
  • Reflection Generation: Analyzes failures to pinpoint root causes, incorrect assumptions, and suggests alternative strategies.
  • Memory Storage: Stores learnings in episodic memory and extracts generalizable patterns for reuse by any agent.
  • Retry with Knowledge: Re-attempts tasks with an enhanced context that includes lessons learned from previous failures.
  • Use Case: An agent fails to generate secure code. The Reflexion Skill captures the failure, analyzes the security vulnerability, generates a reflection on best practices for secure coding, and stores this pattern. The agent then retries the task with the new knowledge, successfully generating secure code.

Quick Start

Use the reflexion skill to analyze the failure of the last code generation attempt and generate a learning reflection.

Frequently Asked Questions about reflexion

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I make an AI agent learn from its previous task failures?

To make an AI agent learn from previous task failures, you need a self-correction mechanism that captures errors, generates detailed reflections on root causes, and stores these learnings in memory for improved retry attempts.

What is the reflexion approach for autonomous AI systems?

The reflexion approach for autonomous AI systems is a self-correction technique where agents analyze their failed attempts, pinpoint incorrect assumptions, and extract generalizable patterns to refine their strategies and adapt to errors over time.

How do I implement self-correction and continuous improvement for AI agents?

You implement self-correction by capturing failed task metrics and code, generating a reflection on root causes, storing the extracted knowledge in episodic memory, and re-attempting the task with an enhanced context that includes lessons learned.

Can an AI agent retry a failed code generation task using past error analysis?

Yes, an AI agent can retry a failed code generation task by analyzing the previous security vulnerability or error, storing best practices in memory, and re-executing the task with an enhanced context built from past failure analysis.

Does implementing a reflexion mechanism require external dependencies?

Implementing a reflexion mechanism for AI agents does not require external dependencies, as the self-correction and memory storage process operates independently using internal references to capture failures and generate learnings.

When should I use a reflexion strategy instead of standard AI task execution?

You should use a reflexion strategy instead of standard execution when building autonomous systems that require continuous refinement, needing to identify root causes of errors and adapt their strategies to handle complex tasks reliably.