Platform Core
Engine Application
The engine is the platform server: a reactive Spring Boot (WebFlux) application that executes conversations, exposes the REST API and the conversation sockets, and persists everything a conversation produces.
This module documents the engine from the inside. The externally visible API and protocols are documented separately in Core Documentation.
Architecture at a Glance
| Layer | Contents |
|---|---|
Reactive REST controllers under |
|
The plain WebSocket handler, the Twilio Media Streams handler and the Socket.IO service. All three converge on the pipeline service. |
|
The conversation runtime: configuration, session state machine, contexts and the realtime manager that orchestrates a turn. |
|
Pluggable parts of a conversation — speech recognizers and synthesizers, interaction and planning managers, extractors, filters, processors, action mappers and aggregators. |
|
Everything the pipeline and the controllers rely on: agents and sessions, prompts, memory, evaluation, storage, billing, integrations. |
|
Language model wiring, tool boxes exposed to agents, prompt handling and LLM logging. |
|
Authentication filters, role mapping and the consumer authorization rules. |
|
Telemetry, metrics, health checks, usage records and the session debugger. |
Entry Point and Bootstrap
EngineApplication.kt is a plain @SpringBootApplication that imports the Jackson and
MessagePack configurations from common and enables caching. All real wiring happens in
EngineConfiguration, which is the composition root:
-
@ComponentScanoverai.promethist.**.configuration,.controller,.componentand.service. The wildcard is deliberate — components declared incommonandlibare picked up the same way as the engine’s own. -
@Enable*Repositoriesfor Elasticsearch and MongoDB (reactive and blocking variants) overai.promethist.**.repository. -
@EnableConfigurationPropertiesfor the properties classes that carry the engine’s configuration:AiProperties,PipelineProperties,ProcessorProperties,EmbeddingProperties,EmotionMixerProperties,IndexerProperties,StorageProperties,SecurityProperties,HttpProxyProperties,SlackProperties,SonioxProperties,ElevenLabsPropertiesandTwilioProperties. -
Beans for the Socket.IO server, the shared
WebClientbuilders (with JWT forwarding and optional HTTP proxy), the WebFlux codecs, the resource storage, the Pebble engine and the WebSocket handler mapping. -
CORS is opened for
/api/; view resolution uses FreeMarker; static resources and the SPA fallback for/client/are served from the classpath.
Its @PostConstruct also sizes the Reactor event loops and the bounded elastic scheduler from
PipelineProperties, and forces the FFmpeg/JavaCV native libraries to load on the startup thread
— lazily loading them on a request thread can leave the native classes unusable if that request is
cancelled mid-initialization.
Listeners
| Port | Served content |
|---|---|
9010 |
REST API ( |
9011 |
Socket.IO server, namespace |
WebSocket upgrades use the Reactor Netty strategy with a 1 MB maximum frame size; the Socket.IO server applies the same 1 MB limit to frames and HTTP content.
Other Configuration Classes
| Class | Responsibility |
|---|---|
Declares the Elasticsearch-backed scoped memories — session, short-term and knowledge memory — with their embedding models. |
|
A dedicated |
|
Augments the generated OpenAPI document ( |
|
The security filter chain — see Security Implementation. |
|
Supplies an empty client registration repository so the application starts even when no third-party OAuth providers are configured. |
Configuration Properties
Defaults live in engine/src/main/resources/application.properties; environments override them
with an additional properties file (see Development Setup and
Core Deployment). The main namespaces are:
| Prefix | Configures |
|---|---|
|
Data store connections. |
|
Resource storage backend ( |
|
The available pipeline setups — see Interaction Pipeline. |
|
Speech synthesis defaults and optional pipeline features. |
|
Per-component language model selection and parameters — see AI Layer. |
|
Embedding provider and model dimensions. |
|
API keys and the JWT issuer. |
|
Indexing and telemetry — see Observability. |