Sagi is a production-ready, open-source LLM agent framework that combines advanced technologies to create powerful AI agents. It features:
- 🧠 Deep-research workflow architecture, more details refers to the doc
- 🛠️ MCP (Model Context Protocol) integration, the guide of the usage of MCP refers to the doc
- 📊 GraphRAG-powered retrieval system, HiRAG mcp server refers to the repo
- [2025/04] 🔥 Sagi is publicly released!
- Interactive Web UI
- Advanced file chunking & indexing supports
- Improved documentation with more demos
- Chat history & workflow state management
-
System Requirements
- Docker and Docker Compose (Installation Guide)
-
Clone the Repository
git clone https://github.com/Kasma-Inc/Sagi.git cd Sagi -
Environment Setup
cp .env.example .envConfigure the following in your
.envfile:OPENAI_API_KEY- Your OpenAI API keyBRAVE_API_KEY- Your Brave Search API keyVOYAGE_API_KEY- (Optional) Your Voyage API key. Required for the reranker component when using therag_agent.DOC2X_API_KEY- (Optional) Your DOC2X API key. Required for the PDF parsing component when using therag_agent.OPENAI_BASE_URL- (Optional) Custom endpoint URLPOSTGRES_URL_NO_SSL- (Optional) Custom PostgreSQL URL without SSL. You can use the https://neon.com/ to create a free database. We will add the on-premise database support in the docker-compose.yml file soon.POSTGRES_URL_NO_SSL_DEV- (Optional) Custom PostgreSQL URL without SSL for development.
-
Build the Docker Container
chmod +x dev/setup.sh ./dev/setup.sh -
Access the Container (Choose one method)
- Option A: Use VSCode Remote Container (Recommended). You can run
bash dev/install_vscode_extensions.shto install the basic plugins for the development. - Option B: Access via terminal:
docker exec -it "$(whoami)_sagi-dev" /bin/bash
- Option A: Use VSCode Remote Container (Recommended). You can run
-
Install Dependencies
- Option A: pip install
pip install -e .- Option B: uv install
uv venv source .venv/bin/activate uv pip install -e . -
Start CLI
python cli.py
We welcome contributions! Please feel free to submit a pull request. We also welcome any questions via Github Issues or via the community group, please join us.
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.