# Multi-Agent System Base (MASB)

MASB is a FastAPI application that orchestrates a multi-agent system to answer questions by combining live web search with a FAISS-backed retrieval-augmented knowledge base, streaming its answer back over server-sent events.

A top-level manager agent, built as a CodeAgent using the smolagents library, plans a request and delegates it to two specialist tool-calling agents: a web agent that searches with DuckDuckGo, and a retriever agent backed by a FAISS vector store built from a Hugging Face documentation dataset. Each chat session runs its own agent instance through an async bridge, and replies stream back to the client as server-sent events with distinct message-delta, message-done and workflow-failed events plus a periodic heartbeat.

The underlying model can be a local Ollama model or a cloud model reached through an OpenAI-compatible server. Session and message history are persisted to PostgreSQL through SQLAlchemy with Alembic migrations, and a simple health-check endpoint reports liveness.

It is written in Python.

Website: https://github.com/nguyenhoang2001/Multiple-Agentic-System-Base
