Personal AI Assistant
A full-stack AI assistant that plans before it acts: an LLM drafts a plan, the backend validates it, steps run in parallel with live progress, and nothing is sent until you approve it.
- Role
- Full-stack and AI engineering
- Year
- 2026
- Technologies
- Python
- FastAPI
- LangGraph
- LangChain
- TypeScript
- Next.js
- React
- Tailwind CSS
- Playwright

Overview
You ask in plain language, for example “Check tomorrow's weather in Singapore, search for recent AI news, summarize both, and send the summary to Telegram.” An LLM turns that into a plan, the backend checks it, independent steps run at the same time while the browser shows live progress, and the message is only sent after you approve its exact text.
The backend is FastAPI. A LangGraph planner asks the LLM (Groq, OpenAI or Anthropic through LangChain) for a structured plan and gives it one chance to repair a plan that fails validation. Every plan is checked against a typed tool registry before anything runs: registered tools only, valid arguments, no dependency cycles, size limits, and approval for anything that acts on the outside world. A single asyncio executor then runs the plan as a dependency graph, calling Open-Meteo for weather, Tavily for web search, the LLM for the summary and the Telegram Bot API for delivery.
Every state change is an event. The backend applies events with a reducer and streams them over Server-Sent Events; the Next.js frontend applies the same events with a TypeScript twin of that reducer, so a page refresh or dropped connection resumes exactly where it left off. A fixture recorded from the Python executor is replayed in the frontend's tests to keep both sides in agreement.
The LLM never executes anything: it returns a plan and Python decides what runs. The Telegram recipient is fixed in server configuration, the text you approve is frozen and sent at most once, and a send that Telegram doesn't confirm is reported as “delivery unknown” instead of being retried. Web content reaches the model fenced as untrusted data, and citations are limited to URLs the search actually returned.
I built it in four milestones: a FastAPI and tool-calling foundation, a mock-driven frontend, the frontend-to-backend integration with SSE, and finally real LLM planning and real integrations. It can also run fully mocked, with no API keys, for demos and tests.
Highlights
- LangGraph planner with structured output, backend validation and one bounded repair attempt
- Plans validated against a typed tool registry (schemas, risk levels, timeouts) before execution
- Parallel DAG execution with asyncio and live progress over resumable Server-Sent Events
- Human-in-the-loop approvals with at-most-once Telegram delivery of the exact approved text
- The same event reducer in Python and TypeScript, kept in sync by a shared contract fixture
- Provider-agnostic LLM layer (Groq, OpenAI, Anthropic) with timeouts and token usage tracking
- 230 automated tests across pytest, Vitest and Playwright (desktop and mobile), with network access blocked in unit tests





