Skip to content
asadullah48Public

About

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.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

🔄 LoopAI: Feedback-Driven Agents with Plan-Act-Verify Self-Correction

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.

License: Apache 2.0 Python 3.10+ Tests Passing FastAPI Author


🚀 Key Value Propositions

  1. 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.
  2. 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.
  3. Deterministic Convergence Threshold: Guarantees output validity with $V_{ ext{score}} \ge 0.90$ convergence criteria and iteration boundary limits.
  4. Actionable Critique Reflection: Incorporates failed assertion feedback directly into iteration replanning steps.
  5. Interactive Self-Correction Studio: Modern glassmorphic bilingual (English/Arabic RTL) dashboard with live iteration trackers, diff viewers, and confidence gauges.

🏛️ LoopAI Architecture

                    ┌─────────────────────────┐
                    │    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 │
                    └─────────────────────────┘

🛠️ Quick Start

# 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

🤖 Agentic AI Alignment

  • 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.

Roadmap

  • 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.

🤖 Author

Built by Asadullah Shafique.

🔗 Explore my portfolio showcasing Agentic AI projects and real-world applications: asadullahshafique-devunity.vercel.app

🌐 Connected Ecosystem & Portfolio

About

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.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages