An enterprise agent framework enabling autonomous AI agents to self-correct, reflect, and iteratively converge to verified correctness through closed Plan-Act-Verify feedback loops.
- Closed Plan-Act-Verify Feedback Loop: Moves beyond single-shot prompt execution to iterative reflection where agents audit their own work before final sign-off.
-
Autonomous Multi-Agent Collaboration:
-
PlannerAgent: Sets goals, dependency steps, and formal verification assertions. -
ActorAgent: Executes tools and drafts candidate solutions. -
VerifierAgent: Checks evidence against assertions, calculates confidence ($V_{ ext{score}}$ ), and returns actionable critique.
-
-
Deterministic Convergence Threshold: Guarantees output validity with
$V_{ ext{score}} \ge 0.90$ convergence criteria and iteration boundary limits. - Actionable Critique Reflection: Incorporates failed assertion feedback directly into iteration replanning steps.
- Interactive Self-Correction Studio: Modern glassmorphic bilingual (English/Arabic RTL) dashboard with live iteration trackers, diff viewers, and confidence gauges.
┌─────────────────────────┐
│ Enterprise Goal │
└────────────┬────────────┘
│
┌────────────▼────────────┐
│ LoopAI Engine Loop │
└────────────┬────────────┘
│
┌────────────▼────────────┐
│ PlannerAgent │◄────────┐
│ • Assertion Modeling │ │
└────────────┬────────────┘ │
│ │ (Critique &
┌────────────▼────────────┐ │ Replanning)
│ ActorAgent │ │
│ • Tool Execution │ │
└────────────┬────────────┘ │
│ │
┌────────────▼────────────┐ │
│ VerifierAgent │─────────┘
│ • Evidentiary Audit │ (If V_score < 0.90)
│ • Confidence Scoring │
└────────────┬────────────┘
│ (If V_score >= 0.90)
┌────────────▼────────────┐
│ Final Verified Solution │
└─────────────────────────┘
# 1. Clone repository
git clone https://github.com/asadullah48/loopai.git
cd loopai
# 2. Install dependencies
pip install -e .
# 3. Run automated test suite
python -m pytest tests -v
# 4. Start local gateway & frontend loop studio
uvicorn loopai.server:app --host 127.0.0.1 --port 8009 --reload- Interactive Loop Studio: http://127.0.0.1:8009/
- Swagger OpenAPI Docs: http://127.0.0.1:8009/docs
- Autonomy — PlannerAgent → ActorAgent → VerifierAgent form a closed loop that audits its own work before final sign-off, with no human gating each iteration.
-
Resilience — the deterministic convergence threshold (
$V_{score} \ge 0.90$ ) plus an iteration boundary means the loop either converges to verified correctness or terminates cleanly — it doesn't run forever chasing an unreachable bar. - Adaptivity — VerifierAgent's critique feeds directly into the next planning iteration, so ActorAgent's next attempt is shaped by the specific assertion that failed, not a blind retry.
- Generalize the Plan-Act-Verify loop into an MCP tool other agent systems can call for self-correction, rather than only running as this standalone service.
- Extend the convergence/iteration-boundary parameters to be per-task configurable, so higher-stakes tasks can demand a stricter threshold.
Built by Asadullah Shafique.
🔗 Explore my portfolio showcasing Agentic AI projects and real-world applications: asadullahshafique-devunity.vercel.app
- DevUnity Portfolio: https://asadullahshafique-devunity.vercel.app
- HarnessAI: https://github.com/asadullah48/harnessai
- SecureBridge: https://github.com/asadullah48/securebridge
- WorkforceAI Academy: https://github.com/asadullah48/workforceai-academy
- ConciergeAgent: https://github.com/asadullah48/conciergeagent
- ContextX: https://github.com/asadullah48/contextx
- GuardrailAI: https://github.com/asadullah48/guardrailai
- MarketAgentHub: https://github.com/asadullah48/marketagenthub
- WorkforceAI: https://github.com/asadullah48/workforceai
- DomainX: https://github.com/asadullah48/domainx