Architecture
MUCGPT uses a modern microservices architecture optimized for scalability and maintainability:
- Frontend: User interface layer built with React (based on a template from Microsoft Azure); receives agent runs as an AG-UI event stream
- API Gateway: Entry point for all client requests, based on the Spring-based RefArch gateway with OAuth2/OpenID Connect
- Core service: LLM agent orchestration (LangGraph / Deep Agents), tool integration, document parsing, and server-side conversation persistence
- Assistant service: Configuration management for assistants — creation, modification, and sharing
- PostgreSQL: Database for persistence
- Keycloak: Authentication and user management


Components in detail
The user talks to a Java API gateway that handles OpenID Connect login and token validation (single sign-on via Keycloak). Behind it, two Python FastAPI services split the work:
- MUCGPT-Core orchestrates the LLM agent with LangGraph and Deep Agents, exposes local and MCP tools, parses uploaded documents (via Xberg), and persists conversations and canvas documents in PostgreSQL.
- MUCGPT-Assistants manages assistant configurations and their sharing scope, using the LDAP department tree for organizational scoping.
The core service connects to any OpenAI-compatible LLM gateway or provider, optional MCP servers for additional tools, optional tracing via Langfuse, and an optional document parsing service (Xberg). Redis/Valkey serves as the cache layer for MCP tool metadata, the LDAP directory tree, and compliance verifications.
Deep dive
Detailed runtime diagrams live in the development section: AG-UI streaming, the Deep-Agent runtime, and Tools & MCP.