{"data":{"slug":"zleap-ai-sag","name":"SAG","tagline":"Document retrieval system built on SAG","github_url":"https://github.com/Zleap-AI/SAG","owner":"Zleap-AI","repo":"SAG","owner_avatar_url":"https://avatars.githubusercontent.com/u/239856193?v=4","primary_language":"Python","stars":2500,"forks":162,"topics":["agent","ai","data-engineering","graphrag","knowledge-base","knowledge-graph","knowledge-graphs","llm","rag","sag","vector-search"],"archived":false,"github_pushed_at":"2026-09-20T02:11:49+00:00","maintenance_label":"Very active","stars_delta_30d":284,"url":"https://www.graphcanon.com/tools/zleap-ai-sag","markdown_url":"https://www.graphcanon.com/tools/zleap-ai-sag.md","api_url":"https://www.graphcanon.com/api/graphcanon/tools/zleap-ai-sag","graph_url":"https://www.graphcanon.com/api/graphcanon/graph?tool=zleap-ai-sag","description":"A new SOTA for RAG — an original retrieval architecture and an open-source knowledge base for humans and agents.","homepage_url":"https://zleap.com","license":"MIT","open_issues":0,"watchers":3,"ai_summary":"A document retrieval project developed using TypeScript to enable efficient search and retrieval of information within a knowledge base utilizing graph and vector-based techniques.","readme_excerpt":"### Quick start (Docker, self-hosted)\n\nRequirements: Docker Desktop, or Docker Engine with Compose v2.\n\n```bash\ngit clone https://github.com/Zleap-AI/SAG.git\ncd SAG\ndocker compose up -d --build\n```\n\nNo API key, Python runtime, Node runtime, or external database is required to boot the application. When both services are healthy, open:\n\n- Web application: [http://localhost:3000](http://localhost:3000)\n- API documentation: [http://localhost:8000/docs](http://localhost:8000/docs)\n\nOn first launch:\n\n1. Enter your name to create or restore the local identity.\n2. Use the 302.AI quick setup, or open **Settings → Models** and configure any OpenAI-compatible LLM and embedding endpoint.\n3. Create a source, upload documents, and wait until their status is **Ready**.\n4. Search, open the original source, or start a cited conversation.\n\nThe UI and services still start without model credentials. Embeddings are required for indexing/vector retrieval; the LLM is required for event extraction, query understanding, and generated answers.\n\n#### Model settings precedence\n\n`SAG_LLM_*` values in Docker Compose or `.env` provide the initial model configuration. After an administrator saves model settings in the web UI, the persisted Settings value is used for subsequent extraction and generation jobs without a restart.\n\nTo make the deployment configuration mandatory, set `SAG_LOCK_LLM_CONFIG=true`. SAG then shows the generation fields as locked in Settings and continues to use the `SAG_LLM_*` values. Change Docker Compose or `.env` and restart the API container to update a locked configuration. API keys remain deployment-managed and are never returned by the Settings API.\n\n---\n\n### PostgreSQL/pgvector deployment\n\nThe optional production override moves application metadata and engine storage to PostgreSQL/pgvector:\n\n```bash\ncp .env.example .env\nopenssl rand -hex 32   # set SAG_SECRET_KEY\nopenssl rand -hex 24   # set POSTGRES_PASSWORD\n\ndocker compose -f compose.yaml -f compose.postgres.yaml config\ndocker compose -f compose.yaml -f compose.postgres.yaml up -d --build\n```\n\nSet real `SAG_CORS_ORIGINS` and `NEXT_PUBLIC_API_BASE` values before server deployment. Back up both `pgdata` and `sagdata` before upgrades.\n\n---\n\n---\n\n## Contributing and License\n\n- Contribution workflow: [CONTRIBUTING.md](CONTRIBUTING.md)\n- Python engine: [`zleap-sag` on PyPI](https://pypi.org/project/zleap-sag/)\n- Paper reproduction: [Zleap-AI/SAG-Benchmark](https://github.com/Zleap-AI/SAG-Benchmark)\n\nSAG is released under the [MIT License](LICENSE).\n\n---\n\n<a id=\"community\"></a>","github_created_at":"2025-11-07T07:33:35+00:00","created_at":"2026-07-11T11:33:48.001376+00:00","updated_at":"2026-09-20T06:21:23.773826+00:00","categories":[{"slug":"ai-agents","name":"AI Agents","url":"https://www.graphcanon.com/categories/ai-agents","markdown_url":"https://www.graphcanon.com/categories/ai-agents.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/ai-agents"},{"slug":"data-retrieval","name":"Data & Retrieval","url":"https://www.graphcanon.com/categories/data-retrieval","markdown_url":"https://www.graphcanon.com/categories/data-retrieval.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/data-retrieval"}],"tags":[{"slug":"agent","name":"agent"},{"slug":"ai","name":"ai"},{"slug":"data-engineering","name":"data-engineering"},{"slug":"knowledge-graph","name":"knowledge-graph"},{"slug":"llm","name":"llm"},{"slug":"rag","name":"rag"},{"slug":"sag","name":"sag"},{"slug":"vector-search","name":"vector-search"}],"trust":{"provenance":{"is_fork":false,"github_id":1091563845,"owner_type":"Organization","methodology":"github_public_v1","parent_repo":null,"near_duplicate_slugs":[]},"computed_at":"2026-09-20T06:21:21.392Z","maintenance":{"label":"Very active","score":96,"methodology":"github_public_v1","releases_90d":30,"days_since_push":0,"last_release_at":"2026-09-20T02:33:05Z","stars_delta_30d":284,"open_issues_delta_30d":0},"security_summary":{"status":"no_lockfile","scanner":null,"low_count":0,"high_count":0,"last_scan_at":"2026-07-11T11:33:51.059Z","medium_count":0,"scan_profile":"none","critical_count":0}},"capability_facts":{"scan":{"source":"repo_scan","observed_at":"2026-09-20T06:21:22.409Z"},"languages":{"value":["python"],"source":"github.language","observed_at":"2026-09-20T06:21:22.409Z"},"license_spdx":{"value":"MIT","source":"github.license","observed_at":"2026-09-20T06:21:22.409Z"}},"decision_facts":{"hosting":null,"pricing":null,"requirements":null,"constraints":null,"when_to_use":["When you need graph and vector-based techniques for retrieving documents","If your application requires integration capabilities within a knowledge base environment using TypeScript"],"when_not_to_use":["Avoid if the project requires features not supported by TypeScript, favoring alternative languages or environments instead","Do not use SAG when the architecture of your system cannot benefit from graph and vector-based retrieval methods, as it may lead to underutilization of its capabilities"],"source":"enrich:decision_facts","observed_at":"2026-07-14T21:38:38.268Z"},"constraint_facets":null,"decision_summary":[{"label":"Adopt for","value":"SAG is a document retrieval project built with TypeScript to aid in efficient search and retrieval within knowledge bases."}]}}