A simple Todo app, built to learn LangChain and LangGraph. Starts as a
plain FastAPI + MySQL CRUD app with a vanilla HTML/CSS/JS frontend, then
extended with a tool-calling LLM agent (Ollama, llama3.1:8b) that can
manage todos through natural language.
Frontend (HTML/CSS/JS) --> Backend (FastAPI) --> Database (MySQL)
Plain REST CRUD: the frontend calls GET /todos, POST /todo,
DELETE /todo/:id, DELETE /todos; the backend does plain CRUD against
MySQL via SQLAlchemy.
Frontend (HTML/CSS/JS) --> Backend (FastAPI) --> Database (MySQL)
‖
Agent
(Ollama · llama3.1:8b, tool-calling)
The original REST stack is unchanged. A separate agent
(backend/agents/agent.py) shares the same CRUD tool layer
(backend/app/crud.py) to manage todos through natural-language chat, with
multi-turn conversation memory. The agent currently runs standalone (a CLI
chat loop) and is not yet wired into the FastAPI backend.
Next 2 steps:
- Rebuild the hand-rolled agent loop using LangGraph (
StateGraph, nodes/edges,ToolNode). - Wire the agent into the FastAPI backend as a real endpoint
(e.g.
POST /chat), so the frontend can talk to it directly.
TBD
