The LLM explains, never calculates
Every figure in an answer was computed in code and carries a provenance tag, so a number can be traced to brokerage data, a search result, or a calculation, and the model has nothing to invent.
A single-user financial assistant over read-only brokerage data, where every number comes from code and the LLM only explains it.
An assistant connected to a brokerage account should answer 'how is my portfolio doing, why did this fall, am I over-concentrated' from real holdings and live news. It must never trade, leak tokens, invent numbers, or follow instructions buried in web content.
01
Regular-expression rules refuse prompt injection, credential requests, and questions about other people's data before any LLM or tool runs.
02
Intent is matched in code and sent to a LangGraph workflow: portfolio or research. Only questions the router cannot place go to a Google ADK agent with four sub-agents.
03
Long-term memory loads with privacy levels and writes only after the user confirms. If the brokerage login has expired, the workflow takes a degraded branch instead of failing.
04
The brokerage is reached over MCP, with its tools loaded as LangChain tools. An allow-list admits 16 read-only tools; trading tools and anything unknown are blocked inside the client.
05
Allocation, concentration, and risk are computed without a model, and every section of the snapshot is tagged with where it came from: brokerage data, web search, or a deterministic calculation.
06
Research questions search the web with a fallback provider, and results are fenced as untrusted external data before they reach the model.
07
The LLM router falls back from NVIDIA NIM to Gemini Flash and logs every call with the reason for any fallback. The model only explains numbers it was given, and a final check withholds anything that looks like a leaked secret.
Every figure in an answer was computed in code and carries a provenance tag, so a number can be traced to brokerage data, a search result, or a calculation, and the model has nothing to invent.
Injection and credential requests are blocked by rules, write tools by the MCP tool policy, and leaked secrets by an output screen.
The ADK agent calls LangGraph workflows directly in Python, behind an interface that can later become an agent-to-agent call without changing the workflows.
Python · LangGraph · Google ADK · MCP (Kite) · langchain-mcp-adapters · NVIDIA NIM · Gemini Flash · SQLite · Streamlit · Docker