An AI-powered learning plan generator that takes a user's topic of interest and produces a structured, beginner-friendly learning plan by combining:
- Multi-agent orchestration using LangGraph
- Tool calling via MCP (Model Context Protocol)
- Real-time web search (DuckDuckGo)
- Vector database search (pgvector)
- Local LLM inference using Ollama (Llama3)
User Query
↓
Planner Agent (breaks query into research steps)
↓
Research Agent (decides web_search or vector_search per step)
├──→ web_search (DuckDuckGo via MCP)
└──→ vector_search (pgvector via MCP)
↓
Organizer Agent (generates structured learning plan)
↓
Final Learning Plan
- Takes the user's raw query
- Uses Llama3 to break it into 3-5 specific research steps
- Populates
stepsin the agent state
- Iterates over each research step
- Uses Llama3 to decide which tool fits each step (
web_searchorvector_search) - Calls the chosen tool via MCP session
- Populates
contextin the agent state
- Combines all gathered context
- Uses Llama3 to generate a clear, structured, beginner-friendly learning plan
- Populates
finalin the agent state
| Layer | Technology |
|---|---|
| Backend | FastAPI, LangGraph |
| LLM | Ollama (Llama3) |
| Tool Server | MCP (FastMCP) |
| Database | PostgreSQL + pgvector |
| Web Search | DuckDuckGo (duckduckgo-search) |
| Infrastructure | Docker, Docker Compose |
git clone <repo-url>
cd <project-folder>
docker-compose up -d --build
⚠️ First startup takes a few minutes — Ollama needs to pull and warm up the Llama3 model before other services start.
Request:
POST /plan?query=How do I learn Python?Response:
{
"query": "How do I learn Python?",
"steps": ["...", "..."],
"context": ["...", "..."],
"final": "Step 1: ..."
}app/
├── main.py
├── graph.py
├── state.py
└── agents/
├── planner.py
├── researcher.py
└── organizer.py
mcp_server/
├── server.py
├── db.py
└── mcp_client.py
docker-compose.yml
The system takes a user's learning topic, breaks it into focused research steps using Llama3, gathers relevant information from both the web and a local knowledge base via MCP tools, and produces a structured step-by-step learning plan — all orchestrated through a multi-agent LangGraph workflow running entirely on local infrastructure.