βββββββ βββββββ βββ βββ βββββ βββ ββ ββββββββ ββ ββββββ
ββ ββ ββββ ββββ ββ ββ ββββ ββ ββ ββ ββ
βββββββ βββββ ββ ββββ ββ βββββββ ββ ββ ββ ββ ββ ββ
ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ
βββββββ βββββββ ββ ββ ββ ββ ββ ββββ ββ ββ ββββββ
βββββββ βββββββ βββββ ββββββ ββββββ ββ ββ
ββ ββ ββ ββ ββ ββ ββ ββ ββ
βββββββ βββββ βββββββ ββββββ ββ βββββββ
ββ ββ ββ ββ ββ ββ ββ ββ ββ
βββββββ βββββββ ββ ββ ββ ββ ββββββ ββ ββ
Enterprise-grade semantic search powered by LlamaIndex PropertyGraphIndex with TRUE 95/5 architecture.
837 lines of code. 25 Python modules. One unified intelligence layer.
Semantic Search Service is a complete intelligence layer for your development workflow:
- π Semantic Code Search - Search your codebase semantically, not just text matching
- π§ Conversation Memory - Index and search your Claude/AI conversations
- π Knowledge Graphs - PropertyGraphIndex creates entity relationships from your code
- π Business Logic Extraction - Automatically extract business rules and workflows
- β‘ Real-time Integrations - Sub-100ms responses for tools like temporal-hooks and task-enforcer
- π¨ Auto-documentation - Generate API docs and diagrams automatically
- π Multiple Interfaces - FastAPI REST, CLI, and MCP (Model Context Protocol) for Claude
git clone https://github.com/alicoding/semantic-search-service.git
cd semantic-search-service
# Copy and configure
cp .env.example .env
# Add your OPENAI_API_KEY or ELECTRONHUB_API_KEY
# Start everything
./setup.sh
# Index your project
./semantic-search index . my-project
# Search semantically
./semantic-search search "authentication logic" my-project
# Index any codebase
./semantic-search index /path/to/project project-name
# Semantic search (not just text matching)
./semantic-search search "error handling patterns" project-name
# Check if components exist (for task-enforcer integration)
./semantic-search exists "AuthService" project-name
# Find SOLID/DRY violations (for temporal-hooks integration)
./semantic-search violations project-name
# Index your Claude conversations
curl -X POST "http://localhost:8000/index/conversations" \
-H "Content-Type: application/json" \
-d '{"path": "/path/to/conversations", "collection": "my-conversations"}'
# Search your conversation history
curl "http://localhost:8000/search/memory?query=authentication&limit=5"
# Generate knowledge graph from codebase
curl "http://localhost:8000/graph/my-project"
# Export to NetworkX format
curl "http://localhost:8000/graph/my-project/export"
# Visualize relationships
curl "http://localhost:8000/graph/my-project/visualize"
# Generate API documentation
python src/core/auto_docs.py generate
# Generate sequence diagrams
curl -X POST "http://localhost:8000/diagram/sequence?project=my-project"
# Extract business logic
curl -X POST "http://localhost:8000/extract/business-logic?project=my-project"
Everything is configured via config.yaml
:
# LLM Configuration - Works with OpenAI, ElectronHub, or Ollama
llm_provider: openai # or ollama for offline
embed_provider: openai
openai_model: claude-opus-4-1-20250805 # ElectronHub models supported!
# Ollama for offline/enterprise
ollama_model: llama3.1:latest
ollama_base_url: http://localhost:11434
# Performance
num_workers: 4
cache_ttl: 3600
# Vector Store
qdrant_url: http://localhost:6333
redis_host: localhost
redis_enabled: true
Core Search:
POST /search/{project}
- Semantic search in projectPOST /index
- Index new projectGET /exists
- Check component existenceGET /violations/{project}
- Find code violations
Conversation Memory:
POST /index/conversations
- Index Claude/AI conversationsGET /search/memory
- Search conversation history
Knowledge Graphs:
GET /graph/{project}
- Get project knowledge graphGET /graph/{project}/visualize
- Generate visualizations
Business Intelligence:
POST /extract/business-logic
- Extract business rulesPOST /diagram/sequence
- Generate sequence diagrams
Integrations:
GET /check/violation
- Real-time violation check (temporal-hooks)GET /context/project
- Project context (AI agents)
Real-time violation detection during development:
GET /check/violation?action=create-new-service&context=my-project
# Returns violations instantly (<100ms cached)
Check if components exist before creating tasks:
GET /exists?component=UserService&project=my-app
# Returns: {"exists": true, "confidence": 0.92, "file": "user_service.py"}
Works directly in Claude Code sessions as MCP tools:
search_code
- Semantic search in projectscheck_exists
- Component existence checkingfind_violations
- SOLID/DRY violation detection
TRUE 95/5 Pattern:
- 95% LlamaIndex Native - PropertyGraphIndex, StorageContext, Settings
- 5% Glue Code - Thin wrappers and configuration
Tech Stack:
- LlamaIndex - PropertyGraphIndex, VectorStoreIndex, query engines
- Qdrant - Vector database (enterprise-grade)
- Redis - Sub-100ms caching
- FastAPI - REST API with auto-generated docs
- Typer - Rich CLI interface
Feature | Target | Status |
---|---|---|
Search Response | <500ms | β <200ms |
Violation Check | <100ms | β Cached |
Component Exists | <200ms | β <100ms |
Conversation Search | <500ms | β |
Knowledge Graph | <3s | β |
- Python 3.8+
- Docker (for Qdrant)
- OpenAI API key OR Ollama (offline mode)
# Clone repository
git clone https://github.com/alicoding/semantic-search-service.git
cd semantic-search-service
# Configure environment
cp .env.example .env
# Edit .env with your API keys
# Automated setup
./setup.sh
# Test installation
curl http://localhost:8000/docs
# Start services
docker-compose up -d
# Index sample project
./semantic-search index . sample-project
# Test search
./semantic-search search "FastAPI endpoints" sample-project
Got Claude conversations? Index and search them:
# If you have claude-parser installed
curl -X POST "http://localhost:8000/index/conversations" \
-H "Content-Type: application/json" \
-d '{"path": "/path/to/conversations", "collection": "my-chats"}'
# Search your conversation history
curl "http://localhost:8000/search/memory?query=how to implement caching&limit=3"
We track all issues publicly with proper DoR/DoD:
- #23 π¨ CRITICAL: Missing health endpoint
- #24 π¨ CRITICAL: API doesn't initialize LlamaIndex Settings
- #25
β οΈ HIGH: Rate limiting crashes git hooks
See PRODUCTION_READINESS_AUDIT.md for complete analysis.
Found a bug? Create an issue with:
- Clear reproduction steps
- Expected vs actual behavior
- Your environment (Ollama/OpenAI, OS, etc.)
We fix real bugs that real users encounter.
- PRODUCTION_READINESS_AUDIT.md - Current production issues
- CAPABILITY_MAPPING.md - What actually works vs. claimed
- docs/ - Detailed guides and API references
Before: Grep for "authentication" returns 500 text matches
After: Semantic search finds actual auth patterns, business logic, and related components with confidence scores
./semantic-search search "user authentication flow" my-project
# Returns: AuthService.authenticate() method, login flow, JWT handling, etc.
# With semantic understanding, not just text matching
Built with LlamaIndex native patterns. Stop searching. Start finding. π―