{"id":50361446,"url":"https://github.com/kkollsga/kglite-docs","last_synced_at":"2026-05-30T02:01:07.552Z","repository":{"id":360886756,"uuid":"1252144613","full_name":"kkollsga/kglite-docs","owner":"kkollsga","description":"Agent-first knowledge base for documents. Built on kglite + BAAI/bge-m3. Multi-format ingest, cross-checked summaries, review kanban, grounding checks, and an MCP server.","archived":false,"fork":false,"pushed_at":"2026-05-28T08:33:18.000Z","size":152,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-28T10:21:34.294Z","etag":null,"topics":["anthropic","bge-m3","claude-code","embeddings","kglite","knowledge-graph","mcp","pdf","rag"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kkollsga.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"docs/contributing.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-28T08:26:33.000Z","updated_at":"2026-05-28T08:33:21.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/kkollsga/kglite-docs","commit_stats":null,"previous_names":["kkollsga/kglite-docs"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/kkollsga/kglite-docs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kkollsga%2Fkglite-docs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kkollsga%2Fkglite-docs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kkollsga%2Fkglite-docs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kkollsga%2Fkglite-docs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kkollsga","download_url":"https://codeload.github.com/kkollsga/kglite-docs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kkollsga%2Fkglite-docs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33677261,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-30T02:00:06.278Z","response_time":92,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["anthropic","bge-m3","claude-code","embeddings","kglite","knowledge-graph","mcp","pdf","rag"],"created_at":"2026-05-30T02:01:06.895Z","updated_at":"2026-05-30T02:01:07.534Z","avatar_url":"https://github.com/kkollsga.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# kglite-docs\n\n\u003e **Agent-first knowledge base for documents.** Ingest PDFs, Office files, Markdown, HTML, or images; chunk + embed them with [BAAI/bge-m3](https://huggingface.co/BAAI/bge-m3); cluster, tag, summarise, fact-check, translate, and review them — and serve the whole thing to AI agents over MCP.\n\n[![PyPI](https://img.shields.io/pypi/v/kglite-docs.svg)](https://pypi.org/project/kglite-docs/)\n[![Python](https://img.shields.io/pypi/pyversions/kglite-docs.svg)](https://pypi.org/project/kglite-docs/)\n[![Docs](https://readthedocs.org/projects/kglite-docs/badge/?version=latest)](https://kglite-docs.readthedocs.io/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nBuilt on [`kglite`](https://github.com/kkollsga/kglite) (storage + vector search + clustering) and [`mcp-methods`](https://github.com/kkollsga/mcp-methods) (MCP framework).\n\n---\n\n## Why this and not generic RAG?\n\nMost \"RAG libraries\" hand the agent `search(query) → list[chunk]` and stop. kglite-docs treats the corpus as a *living* knowledge graph that records who did what — and gives the agent typed tools to act on it.\n\n- 📄 **Multi-format ingest** — PDF, DOCX, PPTX, MD, HTML, TXT, images. All flow into the same `Document → Page → Chunk` shape.\n- 🤝 **Agents are first-class nodes** — their views, tags, summaries, verifications, and reviews are all queryable.\n- ✅ **Cross-checked summaries** — one agent writes, a *different* agent verifies. Self-verification is rejected server-side.\n- 📋 **Review kanban** — chunks move through `new → in_review → reviewed` with an immutable audit trail.\n- 🛡️ **Grounding checks** — score how well an agent's summary aligns with its sources. Catch hallucinations before they ship.\n- 🌍 **Translations** — per-chunk, multi-translator, with author/reviewer provenance.\n- 🖼️ **Agent-driven OCR** — scanned pages handed back as rendered PNGs; agent transcribes and the graph absorbs the result.\n- 🔒 **Local \u0026 private** — parsing, embedding, and analysis all run on your machine against a local `.kgl` file. The only network call is a one-time bge-m3 model download; your documents never leave the host. See [Confidentiality](https://kglite-docs.readthedocs.io/en/latest/privacy/).\n\n## Install\n\n```bash\npip install kglite-docs\n```\n\n## 30 seconds of Python\n\n```python\nfrom kglite_docs import Corpus\n\nwith Corpus.create(\"kb.kgl\") as corpus:           # auto-saves on exit\n    corpus.ingest_dir(\"./papers\")                  # PDF / DOCX / PPTX / MD / HTML / images\n    hits = corpus.search(\"transformer attention\", top_k=5, agent_id=\"me\")\n    ctx = corpus.compose_context(\"transformer attention\", max_tokens=3000)\n    # ctx[\"items\"] is a ranked, token-budgeted bundle ready for your LLM prompt\n```\n\n## 30 seconds of agent loop\n\nCross-checked enrichment in five lines:\n\n```python\nsid = corpus.add_summary(\n    target_id=hits[0][\"id\"], text=\"DPR uses a dual BERT encoder…\",\n    agent_id=\"writer\", model=\"opus-4.7\",\n)\n# A different agent verifies — self-verification is rejected\ncorpus.verify_summary(sid, verdict=\"verified\",\n                      verifier_agent_id=\"reviewer\", notes=\"checked p.5\")\n# Score how grounded the summary is in its source chunks\nprint(corpus.check_grounding(sid)[\"supported_fraction\"])    # → 1.0\n```\n\n## Run it as an MCP server\n\n```bash\nkglite-docs-mcp --db kb.kgl\n```\n\nRegister with Claude Code:\n\n```bash\nclaude mcp add kglite-docs -- kglite-docs-mcp --db /abs/path/kb.kgl\n```\n\nThe agent now sees ~30 typed tools (`search`, `compose_context`, `add_summary`, `verify_summary`, `tag_chunk`, `cluster_chunks`, `claim_next_review`, …) plus `cypher_query` as an escape hatch.\n\n## Read the docs\n\n📖 **Full documentation at [kglite-docs.readthedocs.io](https://kglite-docs.readthedocs.io/)**\n\n- [Getting started](https://kglite-docs.readthedocs.io/en/latest/getting-started/) — 10 minutes from `pip install` to a running agent\n- [Agent workflows](https://kglite-docs.readthedocs.io/en/latest/workflows/) — research, comparison, fact-checking, OCR loops, hallucination guards\n- [Architecture](https://kglite-docs.readthedocs.io/en/latest/architecture/) — graph model, design rationale, the 30+ typed MCP tools\n- [API reference](https://kglite-docs.readthedocs.io/en/latest/api/corpus/) — every method, every argument, IDE-friendly type stubs\n- [Troubleshooting](https://kglite-docs.readthedocs.io/en/latest/troubleshooting/) — common failure modes\n- [Confidentiality](https://kglite-docs.readthedocs.io/en/latest/privacy/) — everything runs local; what the one network call is (and isn't)\n- [Changelog](https://kglite-docs.readthedocs.io/en/latest/changelog/)\n\n## License\n\nMIT.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkkollsga%2Fkglite-docs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkkollsga%2Fkglite-docs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkkollsga%2Fkglite-docs/lists"}