ProjectBuild an AI-Powered Digital Bank with RAG: the explanation · Module 10: The agent, a graph with tools and approval · part 12 of 20
Part 12 · Module 10: The agent, a graph with tools and approval
Module 10: The agent, a graph with tools and approval
22 min read·
About 45 minutes · Needs: Module 7 (the ledger) and Module 9 (retrieval) · Code: backend/app/agent/graph.py, backend/app/agent/tools.py, backend/app/services/assistant_service.py
Where this fits
The agent (blue: this module) sits between the router and everything it calls: the models, the ledger and retrieval, with its state in Postgres.
The agent decides what to do with each message. It uses the router's choice of model, calls the language models, reads Priya's accounts through the banking service, searches the documents through retrieval, and keeps every conversation in PostgreSQL.
The rest of this project is yours to keep
This project is bought on its own, once, and stays readable afterwards, including the parts added to it later.