How fareedkhan-dev/multi-agent-ai-system works
Project type and purpose
• This is a Python‐based, notebook‐driven proof-of-concept for a multi-agent AI system. It combines small “ReAct” sub-agents into a supervisor-controlled workflow to answer customer support queries (music catalog lookups, invoice inquiries), while managing short- and long-term memory and human-in-the-loop verification.
File structure
• .env: holds API keys for OpenAI, LangSmith, etc.
• requirements.txt: lists Python dependencies (LangChain, LangGraph, LangSmith, SQLite driver, SQLAlchemy).
• multi_agent.ipynb: the main Jupyter notebook that assembles the workflow, defines tools, nodes, graphs, tests, and evaluation.
• utils.py: helper functions (e.g., show_graph) for visualizing the LangGraph StateGraph.
Key insights from README
• Two core sub-agents:
1. catalog_information_subagent – handles music catalog queries via SQL tools against an in-memory SQLite (Chinook) database
2. invoice_information_subagent – handles invoice lookup queries, also via SQL tools
• A supervisor agent routes user queries to the correct sub-agent(s) and merges results.
• Human-in-the-loop verification layer ensures the customer ID is validated before exposing sensitive data.
• Short-term memory via MemorySaver (conversation state) and long-term memory via InMemoryStore (user profiles).
• Final “create_memory” step updates user profiles with newly discovered preferences.
• Evaluation harness using LangSmith and LLM-as-judge patterns.
Detail without overcomplexity
• Every major component and data store.
• Core ReAct loop abstractly (Assistant Node ↔ Tool Node) rather than each individual tool query.
• Memory load/save steps are visible in the main flow.