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.