$ show bibinprathap/VeritasGraph
VeritasGraph is a comprehensive, governed GraphRAG and agent framework for building enterprise-grade knowledge graphs with verifiable attribution. The repository contains a core Python library (VeritasReason) for knowledge graph construction, semantic extraction, reasoning, provenance tracking, and export, along with multiple domain-specific applications: a HIPAA-safe clinical knowledge graph pipeline (clinical-kg), a floorplan extraction and validation web app (floorplan-kg), a municipality incident reporting chatbot, and a Model Context Protocol (MCP) server for IDE integration. The architecture is modular, with a plugin-based method registry pattern, unified configuration management, and a pipeline orchestration engine. While the primary character is an application framework, it also includes research-oriented components such as clinical benchmarks (MedKG-Signal) and evaluation suites, making it a hybrid project with a strong application focus.
The LLM identified 5 files worth highlighting for reuse:
ProvenanceManager provides W3C PROV-O compliant provenance tracking with in-memory and SQLite backends. It records entity, activity, and agent provenance with SHA-256 checksums, supports revision history, and can export audit logs as JSON or CSV. This component is self-contained, has a clean interface, and can be extracted for any application requiring verifiable data lineage.
ContextGraph is an in-memory knowledge graph that supports BFS traversal, keyword search, entity linking, and a policy engine for rule evaluation. It is used by the agent context system to track decisions and precedents. The implementation is isolated, with no external dependencies beyond standard Python, making it reusable for any application needing a lightweight, queryable graph for context management.
LPGExporter converts internal graph representations to Cypher CREATE statements for Neo4j or other labeled property graph databases. It handles node and relationship batching, index creation, and proper escaping. This exporter is a standalone utility that can be reused in any project needing to serialize a knowledge graph to Cypher format.
BaseProvider defines an abstract interface for LLM providers with methods for generate, generate_structured, and generate_typed. Concrete implementations exist for OpenAI, Anthropic, Gemini, Groq, Ollama, and HuggingFace. This abstraction allows swapping LLM backends without changing application code and can be extracted as a standalone library for any project needing multi-provider LLM support.
PipelineBuilder and ExecutionEngine provide a step-based pipeline orchestration framework with status tracking, parallelism, resource scheduling, and failure handling. Steps can be added with dependencies and configuration overrides. This component is generic enough to be reused for any multi-step data processing workflow, not just knowledge graph construction.