Habr AI details a reflective agent architecture: less autopilot, more self-checking

Habr AI has published a breakdown of a reflective AI agent, an architecture in which the model doesn't just act but pauses to check, draft and confirm. The core ideas are dynamic context, snapshots, loop protection and human-in-the-loop approval for risky steps. The approach matters most in production, where mistakes are costly: code, finance, law and medicine.

AI-processed from Habr AI; edited by Hamidun News
Habr AI details a reflective agent architecture: less autopilot, more self-checking
Source: Habr AI. Collage: Hamidun News.
Listen to article
Article Fact Sheet & Key Figures
ParameterDetails
Primary sourceHabr AI ↗
Editor-in-Chief
Key metric #1Dynamic context — before each step the agent re-collects the available objects, tools, constraints and session history.
Key metric #2Change drafts — any edit first lives in a temporary layer instead of going straight to production.
Key metric #3Reflection phase — before finishing, the agent must check whether it skipped steps, broke the format or introduced contradictions.

Habr AI has published a breakdown of the architecture of a reflective AI agent: a system in which the model doesn't just call tools but goes through a mandatory verification cycle before every important action. The main idea is simple: when mistakes are expensive, it is more useful for an agent to be predictable than fast.

Why speed isn't enough

A typical agent follows a think → do pattern: it grasps the task quickly, then dives straight into files, the CRM, email or the terminal. That looks impressive in a demo, but in a real environment this mode quickly runs into system failures. One hallucination becomes an action, one inaccuracy triggers a cascade of errors, and a misunderstood goal makes the model ignore side effects. The system looks confident right up until its first contact with incomplete, noisy or contradictory data.

The author suggests treating the problem not as a lack of model "intelligence" but as a lack of architecture. Even a strong LLM makes mistakes if it has no built-in pause for rechecking, no clear access boundaries and no rollback mechanism. So this is not about a new prompt but about a new execution loop that forces deliberation between perception, decision and action. That is why speed alone is no longer considered a sufficient advantage.

How the cycle works

Instead of a direct "understand, then do" chain, Habr AI describes a seven-step cycle. On each pass the agent gathers fresh context, builds a plan, drafts the action, checks itself and only then reaches the commit. If data is missing, it can stop, ask a clarifying question or wait for a human response without losing session state. This puts agent mode closer to a careful assistant that knows how to put a task on hold than to an autopilot.

The architecture has several key components:

  • Dynamic context — before each step the agent re-collects the available objects, tools, constraints and session history.
  • Change drafts — any edit first lives in a temporary layer instead of going straight to production.
  • Reflection phase — before finishing, the agent must check whether it skipped steps, broke the format or introduced contradictions.
  • Confirmation gate — risky operations halt until a human gives explicit consent.
  • Commit and rollback — after approval, changes are applied atomically, and if something fails, state can be restored from a snapshot.

The idea of a universal tool protocol is also important. Through a single interface, the agent can connect to a file system, terminal, databases, CRM, browsers, payment services or industry reference databases. The logic stays the same: gather context, then plan, then verify, and only then act. As a result, the same scheme carries over from development to law, medicine, analytics and support without rebuilding the core.

Where the safeguards sit

The article puts safety not in an "output filter" but inside the execution loop itself. Actions are split by risk level: safe reads pass automatically, changes create drafts, and destructive operations require separate confirmation. This matters for publishing, mass mailings, data deletion, financial transactions and any step that can't simply be undone with a back button. In this scheme the human is not an observer but the holder of the final veto.

Technical safeguards work on top of this layer: Scope Jail keeps the agent from leaving the permitted resources, a loop detector stops repeating actions, iteration and token limits cut off runaway scenarios, and snapshots let you roll a session back to its earlier state. Even if the model proposes a dangerous move, the final decision rests not with the text but with the execution layer, which checks every tool call. This lowers the cost of errors and makes the agent loop better suited to production.

"The smartest agent is not the one that does everything itself"

The scheme fits domains where errors are costly: law, medicine, finance, support, marketing, infrastructure. The same pattern holds everywhere: first a hypothesis, then a check against the rules, then action within the granted permissions. The agent can prepare a conclusion, a draft reply, a work plan or a set of edits, but the last step always remains deliberate and verifiable. That is what separates an assistant from an unconditional executor.

What this means

The reflective agent architecture is an attempt to move AI from flashy demo mode to working-tool mode. For the market it is an important signal: the winners will be not only the "smartest" models but the systems with a pause for self-checking, a transparent action log, rollback and human-in-the-loop. Such agents have a real chance of working properly in production, rather than just impressing with speed in presentations. This is no longer magic in the interface but an engineering approach to autonomy.

Story

Key Questions Answered

Why speed isn't enough?

A typical agent follows a think → do pattern: it grasps the task quickly, then dives straight into files, the CRM, email or the terminal. That looks impressive in a demo, but in a real environment this mode quickly runs into system failures. One hallucination becomes an action, one inaccuracy triggers a cascade of errors, and a misunderstood goal makes the model ignore side effects. The system looks confident right up until its first contact with incomplete, noisy or contradictory data. The author suggests treating the problem not as a lack of model "intelligence" but as a

How the cycle works?

Instead of a direct "understand, then do" chain, Habr AI describes a seven-step cycle. On each pass the agent gathers fresh context, builds a plan, drafts the action, checks itself and only then reaches the commit. If data is missing, it can stop, ask a clarifying question or wait for a human response without losing session state. This puts agent mode closer to a careful assistant that knows how to put a task on hold than to an autopilot. The architecture has several key components: Dynamic context — before each step the agent re-collects the available objects, tools, const

Where the safeguards sit?

The article puts safety not in an "output filter" but inside the execution loop itself. Actions are split by risk level: safe reads pass automatically, changes create drafts, and destructive operations require separate confirmation. This matters for publishing, mass mailings, data deletion, financial transactions and any step that can't simply be undone with a back button. In this scheme the human is not an observer but the holder of the final veto. Technical safeguards work on top of this layer: Scope Jail keeps the agent from leaving the permitted resources, a loop detect

ZK
Zhemal Khamidun — CPO at Alpina Digital, product manager of AlpinaGPT. Building AI products since 2019. Hamidun News is a pet project that grew into a production aggregator with 6,000+ readers.
✦ Unified AI Workspace · Nomad

Test Frontier LLMs & Autonomous Agents in One Workspace

Run Claude Opus 5.5, GPT-6, Gemini 3.1, and DeepSeek side-by-side in Nomad AI (nomadnet.ai) — unified model routing, deep research, and multimodal workflows under one subscription.

Try Nomad AI →Launch Nomad Agent
What do you think?
Loading comments…