How sathya-mithra-k/planner-agentic-ai works
Purpose and Entry Points
This is a small planner-oriented agentic AI system with a Python backend and static browser frontend. The backend API entry point is backend/api/main.py; the browser entry point is frontend/index.html. The README provides no operational detail beyond the project name.
API Boundary
backend/api/main.py exposes the application-facing interface between clients and the agent workflow. It is the likely request orchestration boundary: frontend or other consumers submit planning prompts, and the API invokes backend coordination before returning a result.
Multi-Agent Coordination
backend/Agents/coordinator.py is the central control-flow component. It should own the end-to-end agent loop, selecting or sequencing specialist agents and consolidating their outputs. Agent modules are grouped under backend/Agents/__init__.py, separating workflow roles from API concerns.
Planning Stage
backend/Agents/planner.py defines the planning specialist. Its role is to transform an incoming objective and available context into a structured plan, proposed steps, or task decomposition. It is invoked through the coordinator rather than directly by the frontend.
Reflection / Revision Stage
backend/Agents/reflection.py represents a review stage after planning. It likely evaluates plan quality, identifies gaps or inconsistencies, and supplies feedback for revision. Together with the planner, it forms a generate–critique control loop managed by backend/Agents/coordinator.py.
LLM Integration Boundary
backend/core/llm_engine.py encapsulates language-model invocation. Agent implementations should depend on this module rather than embedding provider calls, making model selection, prompting, and response handling a core infrastructure boundary. External LLM provider details are not present in the repository tree or README.
State and Memory
backend/core/memory.py provides memory/state management for agent execution. It is the likely boundary for retaining conversation context, intermediate plans, reflection feedback, or prior results across workflow steps. The coordinator and agents should use it to avoid coupling state persistence to API handlers.
Client Surface and Runtime
The frontend is a lightweight static UI composed of frontend/index.html and frontend/styles.css; no frontend application framework is evident. The backend is Python, with dependencies declared in requirements.txt. The primary flow is: browser/client → backend/api/main.py → coordinator → planner/reflection agents → LLM engine and memory → consolidated API response.
Main entry points: coordinator.py Coordinator · planner.py Planner Agent · reflection.py Reflection Agent · main.py Backend API
Components 11
Static Frontend
- Browser Client
- Planner UI
frontend/index.html - UI Styles
frontend/styles.css
API Layer
- Backend API · Accepts planning prompts and returns workflow results.
backend/api/main.py
Agent Workflow
- Coordinator · Runs the plan–review workflow and consolidates output.
backend/Agents/coordinator.py - Agent Package
backend/Agents/__init__.py - Planner Agent · Turns objectives and context into structured plans.
backend/Agents/planner.py - Reflection Agent · Critiques plans and supplies revision feedback.
backend/Agents/reflection.py
Core Services
- LLM Engine · Centralizes model invocation, prompting, and response handling.
backend/core/llm_engine.py - Memory · Stores workflow context, intermediate plans, and feedback.
backend/core/memory.py
Other components
- Python Dependencies
requirements.txt
Connections 18
- Browser Client → Planner UI: loads UI
- Planner UI → UI Styles: uses
- Planner UI → Backend API: submits planning prompt
- Backend API → Coordinator: invokes workflow
- Coordinator → Planner Agent: requests plan
- Planner Agent → Reflection Agent: proposed plan
- Reflection Agent → Coordinator: review feedback
- Coordinator → Planner Agent: revises plan
- Coordinator → Memory: reads and writes context
- Planner Agent → LLM Engine: generates plan
- Reflection Agent → LLM Engine: evaluates plan
- Planner Agent → Memory: uses context
- Reflection Agent → Memory: uses plan state
- Coordinator → Backend API: consolidated result
- Python Dependencies → Backend API: runtime dependencies
- Agent Package → Coordinator: contains role
- Agent Package → Planner Agent: contains role
- Agent Package → Reflection Agent: contains role