Skip to content

AI Service

Overview

The AI Service exposes OpenAI-compatible REST endpoints for SQL-integrated AI capabilities. It acts as the bridge between the Query layer's native akko_ai_*() functions and the local sovereign LLM stack.

Architecture

Query layer ai_*() functions --> HTTP GET/POST --> AI Service --> AI gateway --> local sovereign LLM

Endpoints

Endpoint Method Description
/v1/analyze_sentiment GET/POST Sentiment analysis
/v1/classify GET/POST Text classification
/v1/summarize GET/POST Text summarization
/v1/translate GET/POST Translation
/v1/extract_entities GET/POST Named entity recognition
/v1/redact_pii GET/POST PII masking (GDPR)
/v1/classify_sensitivity GET/POST Data sensitivity classification
/v1/detect_language GET/POST Language detection
/v1/extract_keywords GET/POST Keyword extraction
/v1/embed GET Vector embedding (768-dim)
/v1/trino-audit POST Query engine (Trino) query audit receiver
/v1/storage-audit POST object storage access audit receiver
/health GET Health check
/metrics GET Metrics layer (Prometheus) metrics

Configuration

Variable Default Description
LLM_URL http://akko-akko-litellm:4000 LLM backend URL
AKKO_AI_SERVICE_TOKEN (empty) Service account token
OLLAMA_HOST http://akko-akko-ollama:11434 Local LLM runtime (Ollama) direct URL

Custom Image

akko-ai-service:2026.03 -- FastAPI + audit endpoints (docker/ai-service/Dockerfile)

License

Apache 2.0