Two-page web app (Admin and Chat) with a FastAPI backend using LangChain + LangGraph ReAct agent and FAISS vector store (Ollama embeddings) for retrieval augmented generation.
- Python 3.10+
- Local OpenAI-compatible chat server at
http://localhost:1234/v1(e.g., llama.cpp server, OpenRouter local proxy, or compatible) - Ollama running with embeddings endpoint
http://localhost:11434/v1and the modelnomic-embed-textpulled - Optional: PDF or TXT knowledge files to index
python -m venv .venv
. .venv/Scripts/activate # Windows PowerShell: .venv\Scripts\Activate.ps1
pip install -r requirements.txtuvicorn app.main:app --reload --host 0.0.0.0 --port 8000Open:
- Admin: http://localhost:8000/admin
- Chat: http://localhost:8000/
- Configure:
- LOCAL_API_BASE (default
http://localhost:1234/v1) - LOCAL_MODEL_NAME (default
gpt-oss:20b) - OLLAMA_LOCAL_API_BASE (default
http://localhost:11434/v1) - EMBEDDING_MODEL_NAME (default
nomic-embed-text) - SYSTEM_PROMPT
- LOCAL_API_BASE (default
- Upload and index PDF/TXT to FAISS
- Persists a
session_idlocally - Sends messages to
/api/chatwhich uses a LangGraph ReAct agent with aknowledge_searchtool to retrieve relevant chunks from FAISS
- Config is persisted to
storage/config.json - FAISS index is stored in
storage/faiss_index - Ensure your LLM and embedding servers are reachable before chatting or indexing
Apache 2.0 License
Contributions are welcome! Please feel free to submit a Pull Request.
This project is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software.
Users are responsible for checking and validating the correctness of their configuration files, safetensor files, and binary files generated using the software. The developers assume no responsibility for any errors, omissions, or other issues coming in these files, or any consequences resulting from the use of these files.

