Engine Application
AI Layer
The abstractions — LLMFactory, LLMConfiguration, ToolBox, ToolSpecification — are defined
in the common library. The engine provides their implementations: the chat
models, the tool boxes agents can call, prompt assembly and invocation logging.
Language Model Wiring
SpringAiLLMService implements SpringAiLLMFactory and builds the Spring AI chat model for a
component and a context. Only streaming use is supported — a conversation streams tokens as they
are produced.
Supported providers:
| Provider | Notes |
|---|---|
OpenAI |
|
Azure OpenAI |
|
Google GenAI |
|
Anthropic |
Triton-served models are reached separately, through the inference model abstraction rather than this factory.
Per-Component Configuration
Every place that calls a model is a component, identified by its class name, and configured
under promethist.ai.llm-components.{ComponentName}:
promethist.ai.llm-components.FactualDataExtractor.provider=AzureOpenAi
promethist.ai.llm-components.FactualDataExtractor.azure-open-ai.deployment-name=gpt-4.1-mini
promethist.ai.llm-components.FactualDataExtractor.azure-open-ai.temperature=0.3
promethist.ai.llm-components.FactualDataExtractor.azure-open-ai.json-output=true
provider selects the provider; the nested block carries that provider’s options. This is how
each extractor, judge, aggregator, planning manager and summarizer gets its own model and
parameters. LLMConfigurationService resolves the effective configuration, including reasoning
model detection and replay overrides, and an agent may carry its own LLMConfiguration that takes
precedence.
Embeddings
EmbeddingModelFactory builds the reactive embedding model for the provider selected by
promethist.embedding.defaultProvider — Triton (the default), OpenAI or Azure OpenAI — with the
model name and vector dimension configured per provider. The scoped memories declared in
MemoryConfiguration use it for indexing and search.
Tool Boxes
A tool box exposes callable tools to the model. ToolBoxService assembles the box for a turn from
the agent, its project and the connected device; MultiToolBox merges the parts and prefixes tool
names with their box name, so tool calls are routed back unambiguously.
| Tool box | Tools |
|---|---|
Retrieval over the user’s session memory: similar past sessions, the last N session summaries, sessions in a time interval, full conversation transcripts, and transcripts and evaluations of agents that share memory with this one. |
|
Semantic search over the project’s knowledge base, with a search timeout guard. |
|
Displays UI to the user — a web page, an image, an input prompt, choices or a rating — with link hallucination guarding applied to any URL the model produces. |
|
Web search and page retrieval through the crawler service. |
|
Wraps one Model Context Protocol server connection as a tool box, proxying calls to the external server and closing the client when the session ends. Connections come from the project’s MCP connector configuration, with per-user OAuth tokens where the server requires them. |
|
Hands the conversation over to another agent, two tools per handover: |
|
A decorator rather than a box of its own: when the wrapped tool is already part of the current plan it returns an interim "results will follow" response instead of calling it again. |
Device-dependent tools (DeviceCommonTools, DeviceWithAudioTools, DeviceWithoutAudioTools),
skill invocation (SkillTools), agent handover (HandoverTools) and the realtime response
model’s request for planning help (RequestHelpTools) are contributed as annotated
tool objects — AnnotatedToolBox derives their specifications from the annotated functions by
reflection, so a tool is added by writing a described function.
Tool availability is also serialized into the prompt, so the model knows what knowledge and tools exist before it calls anything.
Prompts
| Element | Role |
|---|---|
Builds the prompts of an agent: the system prompt from its identity, purpose, guardrails and skills, and the prompts of the metric extractors. Records prompt invocations so they can be shown in the debugger. |
|
|
Templates of the planning prompts. |
|
Response generation prompts, with an internal variant used by the internal realtime model. |
Named templates rendered with Pebble, with the context available as variables. |
|
|
Prompt files shipped with the engine, including the judge prompts used to validate extraction and to compare replayed responses. |
The noSystemPrompt connection parameter suppresses the engine’s own system prompt so an agent’s
instructions can be evaluated in isolation — this is what the testing setups use.
Invocation Logging
LLMLoggerService implements the LLMLogger contract and records every model invocation as an
LLMLog document: the rendered prompt, the response, tool calls and their results, the model and
its parameters, and token usage. Text is passed through
SensitiveInformationMaskerService first.
These logs are what the session endpoints expose to managers and what the session debugger reads and replays.