Modulaire kennislaag voor AI agents -- FastAPI + PostgreSQL (pgvector) + MCP server.
cp .env.example .env
docker compose up --build -d
docker compose exec api alembic revision --autogenerate -m "initial"
docker compose exec api alembic upgrade head
docker compose exec api python -m scripts.seed_knowledge
docker compose exec api python -m scripts.seed_analytics- API docs:
http://localhost:8000/docs - MCP server:
http://localhost:8001/mcp - Dashboard:
http://localhost:8000/dashboard
- Knowledge CRUD -- entries met automatische embedding + chunking
- Semantic Search -- vector search via pgvector
- Structured Analytics -- sales metrics, pipeline, conversie
- Query Planner -- routeert vrije vragen naar juiste databron
- MCP Server -- 24 tools voor Claude (stdio + remote HTTP)
- Synthesis -- automatische cross-references + synthese-documenten
- Contacts -- CRM deduplicatie
- Brain Lint -- health check & completeness score
Pas de seed scripts aan met je eigen content:
scripts/seed_knowledge.py-- kennisbank entries (bedrijfsprofiel, ICP, diensten, tone of voice)scripts/seed_analytics.py-- analytische data (segmenten, metrics)
Pas het dashboard aan via CSS variabelen in src/static/dashboard/dashboard.css:
:root {
--bg: #05050A;
--accent: #00DCFF;
/* etc. */
}Configureer in .env:
API_KEYS=sk-key1:agent_id_1,sk-key2:agent_id_2
REQUIRE_API_KEY=true
- FastAPI (Python 3.12+), async everywhere
- PostgreSQL 16+ with pgvector
- Redis (caching)
- MinIO (S3-compatible file storage)
- sentence-transformers (embeddings)
- MCP (Model Context Protocol)
- Docker Compose
src/ Application code
db/models.py SQLAlchemy ORM models
endpoints/ API route handlers
embeddings/ EmbeddingService + ChunkingService
storage/ MinIO file storage
schemas/ Pydantic v2 models
query_planner/ Query classification + routing
synthesis/ Cross-references + synthesis docs
services/ Query logging + brain lint
middleware/ API key auth + agent scopes
registry/ Pattern detection + dynamic endpoints
config.py Settings (pydantic-settings)
mcp_server.py MCP server (24 tools)
alembic/ Database migrations
scripts/ Seed scripts + utilities
tests/ Pytest test suite
- MCP Setup Guide -- Claude Code / Desktop / remote configuratie