Common Library
Domain Model
The persisted model lives in ai.promethist.model. Documents are MongoDB @Document classes;
the base contracts Entity, Versionable, WithCreated, WithLastModified and the State enum
come from lib.
Organizational Hierarchy
Tenant ──> Project ──> Agent (revisions)
| Document | Contents |
|---|---|
Top of the hierarchy, unique by name. Owns billing and pricing. |
|
A tenant-scoped configuration container, unique by tenant and name. Holds the consumer-facing
branding and terms, the identity providers and whether identity is required, the knowledge
specifications, MCP connector and server specifications, navigation, webhook, action and skill
specifications, and the recording mode ( |
|
The interface implemented by every agent type: |
Agent Types
| Document | Purpose |
|---|---|
Prompt-driven agent: |
|
Relationship-oriented agent: |
|
Agent used to drive automated conversation tests: a required |
TemplatableAgent adds templateRef, templateRevision and templateVariables plus apply(),
so an agent can be created from a Template (BasicAgentTemplate, RelationalAgentTemplate)
whose fields can each be locked. TemplateVariable values are substituted into the agent’s text.
Evaluable is mixed into the agent types that can be evaluated, carrying the evaluation
definitions to run.
Conversation
| Document | Contents |
|---|---|
One conversation. Indexed by |
|
One exchange within a session: raw |
|
A client device or channel, unique by |
|
A platform user, unique by |
The fields returned to clients — which is a subset of the above — are documented in Session API.
Memory and Knowledge
| Document | Contents |
|---|---|
The base contract of a stored memory unit, with an ID derived from a ref and a type. |
|
The chat message history of a session. |
|
Arbitrary typed data with a revision history, so a value’s evolution is preserved. |
|
A snapshot of a user’s whole memory — data, short-term and session memory units — created and restored through the memory endpoints. |
|
A named agent skill, defined as Markdown-like instruction content. |
|
A knowledge source of a project — static text, a file or a URL. |
See Memory for how these are read and written.
Evaluation
| Document | Contents |
|---|---|
One evaluation: its prompt, |
|
Groups insights under an evaluation, with an order. |
|
The schema of a single insight — |
|
Recorded outcomes per session, user and agent, including the agent revision and state at the time, the value, the reasoning and the supporting evidence. |
|
The single headline outcome shown to the user. |
The client-facing shape of these results is documented in Evaluation API.
Feedback
| Document | Contents |
|---|---|
One survey: its trigger point ( |
|
A reusable question: |
|
One serving of a definition to a user and the reaction to it: the |
How the engine schedules and delivers them is described in Feedback Scheduling; the client-facing shape in Feedback API.
Coaching
Built on top of the evaluation results, once a conversation has ended — see Codebook and Development Profile.
| Document | Contents |
|---|---|
One recurring pattern a project’s evaluations keep describing: a short name and the meaning that distinguishes it from the others. Coined by the model, unique per project and name. |
|
One evaluation output filed under a code, with the subject it came from, its user and session, and
the time it was recorded. |
|
One coaching profile per project and user. Holds the authored content, the digest of the evidence it was generated from, and whether it needs review. |
Access, Billing and Integration
| Document | Contents |
|---|---|
A role grant scoped to a tenant or project, for an internal user or an external identity (identity provider ref plus role). See Security Model and Security Implementation. |
|
An audit record: entity type and ID, action, actor and actor type. |
|
The tenant’s billing linkage and its pricing model (per seat, or per seat and minutes). |
|
A tenant- and project-scoped credential, by type. |
|
A user’s token for a third-party service, unique per user and service ref. |
|
|
Model Context Protocol integration: the registered connector with its loaded tool specifications, and the project-level configuration describing it. |
An identity provider offered by a project. |
|
A reusable realtime (speech-to-speech) configuration referenced by agents. |
|
Token usage of a realtime session — text and audio, input, output and cached — aggregatable with
|
|
Project-defined client actions, the record of a multimodal interaction shown to a user, and the agent ref filter used by evaluation queries. |
Logging and Testing
model/logging/ holds the structured records of model invocations — LLMLog, Message, Tool,
Usage and RecordedRealtimeEvent. model/testing/RecordedToolEvent records a tool invocation
for replay. These are what the session debugger
reads.
ToolCallCriteria specifies, per tool name or pattern and project (optionally one agent), when a tool
should and should not be called; it is versioned by ref and revision, edited as a draft and used for classification once published. ToolCallClassification stores
the verdict for one tool in one turn against one criteria revision — see
Tool Call Analysis.