An AI-powered investigative knowledge graph platform that ingests multi-modal source documents, transforms them into temporal knowledge graphs, and enables AI agents to produce citable, wiki-style reports.
DeepInvestigate combines document ingestion, knowledge graph construction, and AI-powered synthesis to create a comprehensive investigative research platform. Every fact in the knowledge graph maintains direct provenance links to source documents, ensuring citability and data integrity.
- Frontend: React Native (mobile-first interface)
- Backend API: Python FastAPI
- Document Processing: docling library
- Relational Database: PostgreSQL (source metadata & extraction artifacts)
- Object Storage: MinIO (S3-compatible storage for processed documents)
- Knowledge Graph: Graphiti framework with Neo4j backend
- Caching: Redis (hot cache for extraction artifacts)
- AI Framework: LangChain/LlamaIndex
- LLM Provider: OpenAI GPT series
Phase 1: Foundational Backend & Ingestion - In Progress
β Project structure and configuration β Docker infrastructure setup β Database schema design π§ Python backend implementation β³ Document ingestion pipeline β³ API endpoints
- Docker and Docker Compose (required for infrastructure)
- Python 3.11+ (for backend development)
- Node.js 18+ (for frontend development - Phase 3)
- Git
git clone <repository-url>
cd DeepInvestigateCopy the example environment file and configure your settings:
cp .env.example .envEdit .env to set your configuration (most defaults work for local development).
Start PostgreSQL, MinIO, Neo4j, and Redis using Docker Compose:
docker-compose up -dThis will start:
- PostgreSQL on
localhost:5432(database automatically initialized with schema) - MinIO on
localhost:9000(API) andlocalhost:9001(Web Console) - Neo4j on
localhost:7474(HTTP) andlocalhost:7687(Bolt) - Redis on
localhost:6379
Check that all services are running:
docker-compose psAll services should show as "healthy" or "running".
Access Web Interfaces:
- MinIO Console: http://localhost:9001 (minioadmin / minioadmin)
- Neo4j Browser: http://localhost:7474 (neo4j / changeme)
Create a virtual environment and install dependencies:
cd backend
python -m venv venv
# On Linux/Mac:
source venv/bin/activate
# On Windows:
venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt# From the backend directory with venv activated
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000The API will be available at:
- API: http://localhost:8000
- Interactive Docs: http://localhost:8000/docs
- OpenAPI Schema: http://localhost:8000/openapi.json
# Start infrastructure
docker-compose up -d
# Activate Python environment
cd backend
source venv/bin/activate # or venv\Scripts\activate on Windows
# Run API server
uvicorn app.main:app --reload# Stop API server: Ctrl+C
# Stop infrastructure
docker-compose down
# Stop infrastructure and remove volumes (CAUTION: deletes all data)
docker-compose down -v# All services
docker-compose logs -f
# Specific service
docker-compose logs -f postgres
docker-compose logs -f minio
docker-compose logs -f neo4j
docker-compose logs -f redis-
POST /api/v1/sources/upload- Upload a new source document- Calculates SHA-256 hash for deduplication
- Processes document with docling
- Stores in MinIO and metadata in PostgreSQL
-
GET /api/v1/sources- List all uploaded sources- Supports filtering and pagination
- Returns source metadata with upload info
- users: User accounts and authentication
- sources: Source document metadata (hash, storage path, upload info)
- extraction_artifacts: Versioned LLM extraction results (Phase 2)
- source_ratings: User ratings (1-5 stars) for sources
- source_comments: User commentary on sources
Node Types:
- Episode (source document)
- Person, Organization, Location
- Event, Technology, Symptom, Project
Relationship Properties:
- Graphiti bi-temporal model:
created_at,expired_at,valid_at,invalid_at
DeepInvestigate/
βββ backend/
β βββ app/
β β βββ api/v1/ # API endpoints
β β βββ core/ # Configuration and utilities
β β βββ models/ # Database models
β β βββ services/ # Business logic services
β βββ tests/ # Backend tests
β βββ requirements.txt # Python dependencies
βββ frontend/ # React Native app (Phase 3)
βββ infrastructure/
β βββ docker/ # Docker initialization scripts
βββ docker-compose.yml # Infrastructure services
βββ .env.example # Environment template
βββ README.md
- Docker infrastructure setup
- FastAPI backend with upload/list endpoints
- Document hashing and deduplication
- docling integration for document processing
- Knowledge graph ontology definition
- Graph Architect Agent for entity extraction
- Three-tier caching (Redis β PostgreSQL β LLM)
- Graphiti integration with Neo4j
- React Native mobile application
- Source library with search and filters
- Basic investigative agent interface
- STORM-inspired synthesis agent
- Query decomposition and outline generation
- Citation mechanism with provenance links
- Human-in-the-loop curation tools
- Knowledge graph promotion (staging β canonical)
- Production deployment and scaling
- Integrated Provenance: Every fact links to its source document (Episode node)
- Federated Knowledge Spaces: Multiple graphs (canonical_kg, staging_kg, hypothesis_kg)
- Versioned Extractions: Cache LLM results by content hash + extraction version
- Entity Normalization: Critical for graph quality and deduplication
DeepInvestigate integrates with Sentry.io for comprehensive error tracking and performance monitoring.
- Create a free account at https://sentry.io
- Create a new Python project for the backend
- Copy your DSN from the project settings
- Update
backend/.env:ENABLE_SENTRY=true SENTRY_DSN=https://[your-key]@o[org-id].ingest.sentry.io/[project-id]
For detailed setup instructions, see backend/SENTRY_SETUP_GUIDE.md
Note: Sentry is optional for local development but recommended for staging and production environments.
# Check Docker is running
docker --version
# View service logs
docker-compose logs
# Restart services
docker-compose restart# Verify PostgreSQL is healthy
docker-compose ps postgres
# Check database logs
docker-compose logs postgres
# Manually test connection
docker exec -it deepinvestigate-postgres psql -U deepinvestigate -d deepinvestigateThe application will automatically create the documents bucket on first use. If manual creation is needed:
- Open MinIO Console: http://localhost:9001
- Login with credentials from
.env - Create bucket named
documents
This project is in active development. See CLAUDE.md for detailed architectural guidance and development instructions.
[License TBD]