Part 2 of 5 — critique-and-revise before delivery. Used in VAP Research + Architecture.
▶ Live demo · Architecture · Portfolio · VAP case study
Self-critique loops improve draft quality before ship — bounded reflection with trace viewer for teaching.
Critic agent revises generator output with stop conditions and structured traces — composable into VAP pipelines.
venkat-ai.com/work · docs/ARCHITECTURE.md
Org skills: vpeetla-ai-skills. This repo includes .cursor/skills/, AGENTS.md, and CONTEXT.md.
git clone https://github.com/vpeetla-ai/vpeetla-ai-skills.git
./vpeetla-ai-skills/scripts/install.sh --cursor --codex --project .| Component | Status | Notes |
|---|---|---|
| Pattern demo + trace UI | ✅ | Live Vercel demo |
| Core agent loop | ✅ | Reference implementation |
| LangGraph production graph | 🟡 | Teaching scope — compose into VAP for fleet use |
| MCP tool bridge | ❌ | See LoopForge / VAP MCP docs |
| AegisAI gateway | ❌ | No side effects in pattern demo |
| Pytest regression | ✅ | pytest -q in repo |
Part 2 of 5 in the Production Agent Patterns series.
Production-grade reference implementation of the Reflection pattern for accuracy-critical generation, code review, content validation, and complex reasoning workflows.
| # | Pattern | Repository | Use when |
|---|---|---|---|
| 1 | ReAct | react-agent-pattern | Tool use + reasoning loops |
| 2 | Reflection | this repo | Self-critique and improve output |
| 3 | Plan-Execute | plan-execute-agent-pattern | Decompose goals into steps |
| 4 | Multi-Agent | multi-agent-system-pattern | Specialized role delegation |
| 5 | Swarm | swarm-agent-pattern | Parallel autonomous agents |
▶ Live demo · 📖 Full series roadmap · 🚀 See in production — AI Content Factory
- Draft → critique → improve → finalize loop
- Quality gates with score thresholds and retry limits
- Independent generator and critic interfaces
- Structured review findings for logging, UI, and evaluation
- Draft, critique, improve, and finalize loop
- Quality gates with score thresholds and retry limits
- Independent generator and critic interfaces
- Structured review findings that can be logged, displayed, or used for evaluation
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
python -m reflection_agent_pattern
pytestRuns without API keys using deterministic generator and critic stubs.
cp .env.example .envSee docs/LOCAL_DEVELOPMENT.md for production setup.
src/reflection_agent_pattern/
__main__.py
reflection.py
models.py
policy.py
docs/ARCHITECTURE.md
tests/test_reflection.py
- Previous: ReAct Agent Pattern
- Next: Plan-Execute Agent Pattern
- Full pipeline: AI Content Factory
⭐ Star the repo if this pattern helps your work.