Holistic End-to-End Overview
This manual verifies the structural integrity boundaries of the entire system.
The Boundary Chain
- Client Software: Submits a query via MCP client.
- FastMCP Server: Intercepts the query. Converts IO to Python objects. Starts Langfuse trace session.
- LangGraph Router: Governs the loop. Prevents infinite looping.
- LangChain LLM: Connects out to Ollama/OpenAI/Anthropic via
httpx. - Python Agents: Pure algorithmic execution. Traps
DIV_ZERO. - PostgreSQL: Stores the traces securely via Langfuse docker instance.
- Langfuse UI: Exposes the visual trace graph at port
3000.
Integrity Checks
- Are credentials safe? Yes, via
.env. - Is the app resilient to LLM failure? Yes, via the fallback LLM factory.
- Is the app resilient to LLM hallucinations? Yes, via the 15-step infinite loop terminator and structured JSON output enforcing Pydantic schemas.
- Is the app resilient to math faults? Yes, via the
divider_nodesafety trap. - Can I observe the system? Yes, full state transitions are available in Langfuse.
The multi-agent BODMAS calculator is complete, production-ready, and fully verified.