Join our Newsletter — 33% off our NHI Course
Agentic AI & Autonomous Identity

Reflexion

← Back to Glossary
By NHI Mgmt Group Updated November 2, 2026 Domain: Agentic AI & Autonomous Identity

Reflexion is a self-refinement technique where an AI agent evaluates its own output, records a critique or lesson, and uses that feedback in the next attempt. It is used in iterative task execution, where the agent updates its plan or prompt after failure, while the human owner still governs tool scope and authority.

What Reflexion Is in Agentic Workflows

Reflexion is a self-improvement loop for an AI agent: it reviews what it just produced, captures a critique or lesson, and feeds that lesson into the next attempt. In practice, it is a mechanism for iterative correction, not a guarantee of correctness, and it still depends on the human owner to define scope, limits, and authority.

The core idea is simple: the agent treats its own prior output as feedback data. That makes it useful in tasks where a single pass is often insufficient, such as planning, code generation, tool-using workflows, or multi-step reasoning. The refinement step can improve consistency, but it can also amplify a bad assumption if the critique is shallow or the objective is poorly framed.

How Reflexion Changes Iterative Task Execution

Reflexion changes the agent from a one-shot generator into a looped system that can adjust its next move after failure. The lesson can be stored in a scratchpad, summary, memory buffer, or updated prompt, depending on the implementation. That means the quality of the feedback matters as much as the original answer, because the next attempt inherits whatever the agent decided was important.

This pattern is especially useful when the task has a visible success signal, such as a failed tool call, a rejected plan, or an incorrect output that can be compared against an expected result. It is less useful when the task has no reliable evaluation signal, because the agent may “learn” from an error report that is incomplete, misleading, or overly confident.

Why Reflexion Is Different from Simple Retry Logic

Reflexion is not just repeating the same request until it works. A plain retry repeats execution; Reflexion adds interpretation. The agent is expected to explain why the previous attempt missed, then carry that explanation forward so the next attempt is more informed. That makes it closer to self-critique than to automatic rerun logic.

It also differs from static prompt engineering because the prompt evolves during execution. Instead of a fixed instruction set, the agent accumulates lessons over time. That can make it more adaptable, but it also creates state management issues: stale lessons, overfitted critiques, or hidden prompt drift can all degrade later attempts.

Authority, Guardrails, and Practical Limits

Reflexion should be understood as a productivity and quality mechanism inside an agentic system, not as a way for the agent to expand its own authority. The human owner still governs what tools can be used, what data can be accessed, and what actions are allowed. If those boundaries are weak, self-refinement can simply make an overpowered or misconfigured agent more effective at the wrong thing.

In well-designed systems, the critique step is constrained by the same policy, tooling, and approval boundaries as the original action. That keeps reflection focused on improving task execution rather than inventing new permissions or changing the operating envelope.

Risk and Threat Considerations

Reflexion can turn a small mistake into a repeated one if the critique process is captured by a false premise, bad feedback signal, or manipulated task state. In agentic workflows, that creates exposure to compounding errors, prompt drift, and trust abuse where the system “learns” the wrong lesson and applies it repeatedly.

Failure mechanism: The agent generalises from an unreliable critique, a poisoned memory entry, or a misleading success metric, then reinforces that conclusion in later attempts. If the agent also has tool access, the same flawed lesson can shape repeated actions rather than just repeated text.

Impact: The result can be persistent incorrect behaviour, wasted compute, unsafe tool use, or repeated execution of a bad plan. In governed environments, the key concern is that refinement improves persistence of behaviour, so bad feedback can become a control problem rather than a simple quality issue.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Agentic AI Top 10 and MITRE ATT&CK address the attack and risk surface, while NIST SP 800-53 Rev 5 and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP Agentic AI Top 10ASI03 — Identity & Privilege AbuseReflexion affects how an agent revises its own tool use and authority.
Recommendation — Constrain the agent’s self-refinement so it cannot expand tool access or action scope.
NIST SP 800-53 Rev 5IA-9 — Identification and Authentication (Non-Organizational Users)Agent workflows often rely on authenticated non-human actors and delegated access.
AU-6 — Audit Record Review, Analysis, and ReportingReflexion depends on reviewing prior outcomes and lessons, which benefits from auditability.
AC-6 — Least PrivilegeHuman owners still govern tool scope and authority in Reflexion-driven workflows.
Recommendation — Apply authenticated access controls to the agent before allowing iterative task execution. Review agent execution logs to validate whether the refinement loop is improving or repeating errors. Limit the agent to the minimum tool and data access needed for each task.
NIST CSF 2.0PR.AA-05 — Identity Management, Authentication and Access ControlReflexion sits inside controlled access decisions for an acting agent.
Recommendation — Enforce access control so the agent can only operate within approved boundaries.
MITRE ATT&CKT1562 — Impair DefensesA compromised feedback loop can be used to weaken oversight and repeat unsafe actions.
Recommendation — Map repeated unsafe agent behaviour to ATT&CK techniques and monitor for defensive bypass patterns.

Practitioner Guidance

What to watch for: Treat the critique channel as a controlled input, not a neutral note field. The most important design question is whether the agent is allowed to revise only its next attempt, or whether it can also reshape its interpretation of scope, tool use, and task success.

Governance implication: Keep refinement bounded by explicit authority and reviewable state so self-critique cannot silently expand what the agent is permitted to do. That is especially important when Reflexion is used in workflows that touch external systems, because the agent’s confidence can rise faster than its actual correctness.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on November 2, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org