Babel Gardens API
LIVELLO 2 service for multilingual semantics: embeddings, sentiment/emotion signals, profiles, and semantic enrichment.
Location
- Service:
services/api_babel_gardens/ - Pure core (LIVELLO 1):
vitruvyan_core/core/cognitive/babel_gardens/
Base URL / Port
Default port is 8009 (env: PORT).
Endpoints (implemented)
Health / metrics
GET /GET /healthGET /metrics
Embeddings
Defined in services/api_babel_gardens/api/routes_embeddings.py:
POST /v1/embeddings/create— embedding for a single textPOST /v1/embeddings/multilingual— embedding with language-aware pathPOST /v1/embeddings/batch— batch embeddingsPOST /v1/embeddings/similarity— cosine similarity between two texts
Sentiment
Defined in services/api_babel_gardens/api/routes_sentiment.py:
POST /v1/sentiment/analyzePOST /v1/sentiment/batch
Emotion
Defined in services/api_babel_gardens/api/routes_emotion.py:
POST /v1/emotion/detect
Profiles + cognitive bridge
Defined in services/api_babel_gardens/api/routes_admin.py:
POST /v1/profiles/createPOST /v1/profiles/adaptPOST /v1/profiles/recommendPOST /v1/events/publishPOST /v1/routing/intelligent
Scope boundary (important)
- Babel Gardens is a semantic-linguistic service, not the graph router.
- It provides language/emotion/sentiment/embedding signals to callers.
- Execution routing is decided by LangGraph orchestration (
intent_detection_node.py+route_node.py), not by Babel Gardens. - Legacy
api_semanticis removed; do not model this service as “api_semantic replacement for routing”.
Request/response schemas
Pydantic models live in services/api_babel_gardens/schemas/api_models.py.
Most important request types:
EmbeddingRequest(text,language,model_type,use_cache)BatchEmbeddingRequest(texts[],language,model_type,use_cache)SentimentRequest(text,language,fusion_mode,use_cache)EmotionRequest(text,language,fusion_mode,use_cache)
Service config env vars
Loaded in services/api_babel_gardens/config.py:
HOST,PORT,DEBUG,LOG_LEVELEMBEDDING_SERVICE_URL,EMBEDDING_ENDPOINT,EMBEDDING_TIMEOUT,EMBEDDING_RETRIESSENTIMENT_SERVICE_URL,SENTIMENT_ENDPOINT,SENTIMENT_TIMEOUTQDRANT_HOST,QDRANT_PORT,QDRANT_COLLECTION_SEMANTIC,QDRANT_COLLECTION_SENTIMENTPOSTGRES_HOST,POSTGRES_PORT,POSTGRES_DB,POSTGRES_USER,POSTGRES_PASSWORDREDIS_HOST,REDIS_PORT,REDIS_DB