Engine Application
Data Access
The persisted domain model itself lives in the common library; the engine adds the repositories that read and write it, plus a number of engine-local documents.
Repository interfaces are in engine/repository/ and are discovered by the
@Enable*Repositories declarations of EngineConfiguration over ai.promethist.**.repository.
MongoDB Repositories
All of these are reactive Spring Data repositories (ReactiveMongoRepository) unless noted.
| Repository | Documents |
|---|---|
Tenants and projects. |
|
Agents and their revisions, with lookups by ref, key and state — the queries behind revision and publish-state resolution. |
|
Agent templates, by ref and state. |
|
Agent skills, by ref. |
|
Sessions. Extends |
|
Turns, including the session-listing queries used by the session history endpoints. |
|
Users. |
|
Devices, resolved by ref on every connection. |
|
|
The per-user and per-project agent groupings returned with a project. |
Memory snapshots created and restored through the memory endpoints. |
|
Memory units by ID prefix. |
|
Stored realtime (speech-to-speech) configurations. |
|
Secrets, scoped by tenant, project and type. |
|
Stored third-party OAuth tokens and the short-lived state of an in-flight authorization flow. |
|
|
Basic authentication identities, looked up by username and secret. |
Language model invocation logs, by session. |
|
Event detail records used for usage metering. |
|
Per-user navigation entry state, by user and project, and of one entry across the users of a
project (for the manual refresh). Also performs the guarded upserts: an
unconditional state write for the session-end judge, and a write for evaluations and the catch-up
on earlier evaluations guarded by the state it moves the entry from ( |
|
Results of profanity validation. |
Elasticsearch
Memory and search go through the generic ElasticsearchRepository and its custom implementation
in the common library: the scoped memory units with their embedding
vectors, vector similarity search, and the indexes for technical and bug reports.
MemoryConfiguration wires the scoped memories (session, short-term, knowledge)
on top of it.
Engine-Local Documents and Types
engine/model/ holds the documents and value types that only the engine needs, as opposed to the
shared model in common:
| Type | Purpose |
|---|---|
|
A username/secret identity with an optional identity provider ref, for Basic authentication. |
The conversational plan produced by the planning managers. |
|
|
Aggregated extraction results as they are stored and read back. |
The agent grouping records behind |
|
An event detail record — active user and active duration for usage metering. |
|
The state — |
|
Profanity validation outcomes. |
|
The state and PKCE verifier of an in-flight OAuth flow. |
|
A named, renderable text template. |
|
Hints attached to tool calls for the model. |
|
Result of a provider health probe. |