Everyone's building "AI agents." Very few are implementing the actual ReAct pattern correctly.
Here's the core loop we use in RagLeap — and why each step matters:
# RagLeap ReAct Loop (simplified)
plan = agent.think(task, memory) # REASON: build multi-step plan
result = agent.act(plan, workspace) # ACT: execute real tool calls
ok = agent.verify(result, plan) # OBSERVE: did it actually work?
if not ok:
healed = agent.heal(result) # HEAL: analyse what broke
if not healed.success:
retry_plan = agent.think( # RE-REASON: new plan with error context
{**task, 'error': result.message}
)
agent.act(retry_plan, workspace) # RE-ACT: try again differently
The key insight: the re-plan step injects the previous error as context. The agent doesn't just retry — it reasons about WHY it failed and builds a different plan.
What most implementations get wrong:
- No verification step — they assume the action succeeded
- Retry = same plan again (useless)
- No memory between attempts
Our stack:
- Django + Celery for async agent tasks
- Neo4j for knowledge graph / memory
- 194 registered tool functions (email, CRM, database, voice)
- 3-layer observability: AgentTrace DB + Guardrails + Live Dashboard
The hardest part wasn't the LLM calls — it was the adaptation loop and making sure tool calls actually executed (not just "said" they did).
Full architecture writeup: ragleap.com/blog/true-agentic-ai/
Platform: ragleap.com/agentic-ai-platform/

Top comments (0)