
A conversational AI agent that turns plain-English messages like "I paid 250 for lunch at Starbucks" into real, validated actions on a backend API.
Architecture: two Python services. A FastAPI + SQLAlchemy + Alembic backend owns users, expenses, reports and an admin console. A separate FastAPI chat agent uses LLM tool calling (OpenAI today, with a pluggable provider layer) to call that backend.
How it works: an intent classifier routes off-topic messages to a lightweight responder, while expense requests go to a planner that can call five tools (list, create, update, delete, summary). Per-session chat memory lets follow-ups like "change that to 300" just work.
Safety by design: the user ID is injected by code, never by the LLM, and update/delete operations verify ownership before executing, so the model can't act on another user's data.
Stack: Python 3.12, FastAPI, SQLAlchemy, Alembic, SQLite, OpenAI tool calling. Source: https://github.com/dhruvesh9/expense-tracker-ai-agent
0 likes · 0 views · Nov 15, 2026
Built a FastAPI backend + LLM tool-calling agent that turns plain-English chat into safe expense actions.