Jeen Platform -- Backend API Documentation
Jeen is a microservices-based AI platform. The backend consists of 13 core services and an MCP ecosystem with 7+ tool servers. Each service runs independently, communicates via HTTP REST or RabbitMQ, and shares PostgreSQL databases where needed.
Base URL
All services expose REST APIs under:
/api/v1
Platform Services
| Service | Purpose | Port | Tech |
|---|---|---|---|
| llm-core | Conversations, agents, models catalog, canvas, templates | 4000 | NestJS, PostgreSQL |
| completion-service | LLM gateway -- routes to 11 providers | 4000 | NestJS |
| agent-service | Agentic loop with tool calling via MCP | 4000 | NestJS |
| document-service | Document upload, storage, processing orchestration | 4000 | NestJS, PostgreSQL, Azure Blob/S3 |
| parser-service | Document parsing (PDF, DOCX, HTML) to markdown | 4004 | Python, FastAPI |
| embedding-service | Text chunking, embedding generation, translation | 4005 | Python, FastAPI |
| rag-service | Vector similarity search and reranking | 4000 | NestJS, pgvector |
| auth-service | Authentication, token management, identity providers | 4000 | NestJS, Redis |
| user-service | BFF -- aggregates user data from downstream services | 4000 | NestJS |
| user-base-ms | User data persistence layer | 4000 | NestJS, PostgreSQL |
| admin-base-ms | Organization management, RBAC, tenant configuration | 4001 | NestJS, PostgreSQL |
| integration-service | Third-party integration gateway (Langflow, etc.) | 4000 | NestJS |
| mcp-client-service | MCP gateway -- discovers and routes tool calls | 8000 | Python, FastAPI |
MCP Tool Servers
| Server | Tool(s) | Purpose |
|---|---|---|
| mcp-rag-tool | search_documents | Semantic document search |
| mcp-spreadsheet | analyze_excel_spreadsheet | Spreadsheet analysis |
| mcp-web-search | web_search | Web search (Tavily/Brave) |
| mcp-veo2 | generateVideoFromText, generateImage | Video/image generation |
| mcp-code-execute-python | run_python_code | Sandboxed Python execution |
| mcp-atlassian | Jira + Confluence tools | Atlassian integration |
| mcp-ui-components | ui_render, show_weather, etc. | Interactive UI in chat |
Authentication
Services use three auth modes:
- JWT -- Bearer token in
Authorizationheader (RS256 or HS256 depending on service) - API Key --
X-Jeen-Api-Keyheader for service-to-service calls - Public -- No auth required (health checks, internal routes)
Inter-Service Communication
Services communicate through:
- HTTP REST -- Direct synchronous calls between services
- RabbitMQ -- Async job processing (document parsing, embedding, transaction events)
- Shared PostgreSQL -- Some services share database tables (document-service, parser-service, embedding-service, rag-service share the document database)
- Redis -- Session storage (auth-service) and caching (llm-core, user-service)
- SSE -- Server-Sent Events for real-time streaming to clients