Skip to Content
DocsOntologyRuntime Closed Loop

Runtime Closed Loop

Namespace: https://ecosystem.ai/ontology/runtime#

Concepts for ecosystem-runtime: score offers, log contacts, accept feedback, and learn.

Sequence

Client → POST /invocations → InvocationResponse (final_result by rank) → ContactLog written (uuid) Client → POST /response (uuid + offer_name) → ResponseFeedback → ResponseLog written (response_uuid, embeds ContactLog)

Same uuid ties invocation, contact log, and response.

API classes

ClassRole
InvocationRequest/invocations body: campaign, subcampaign, customer, channel, numberOffers, paramsJson (string), optional debug
InvocationResponseReturn: uuid, final_result, explore/cache, in_params; optional hasDebug when debug was requested
InvocationDebugDeveloper diagnostics: explanations, errors, config, database, params (not persisted in ContactLog)
InvocationDebugErrorOne debug.errors[] row: stage, code, exception, at, message
InvocationDebugExplanationOne debug.explanations[] row: code, severity, title, message, optional hint
FinalResultEntryRanked row: rank + slim OfferResult + result_full
OfferResultSlim offer: uuid, offerName, scores, cost/price
PersonalityOfferResultTrait-oriented result_full (Spend Personality)
ProductOfferResultProduct + bandit result_full (recommenders)
ResponseFeedback/response body: uuid + offers_accepted
AcceptedOfferAccepted slim offer row

Matching accepted offers: prefer offer_name (also offer / offer_treatment_code).

Logging

ClassStore (typical)Role
ContactLoglogging.ecosystemruntimeInvocation log: uuid, predictor, api_params, params, final_result, stats, scoring_data
ResponseLoglogging.ecosystemruntime_responseFeedback log: uuid, responseUuid, embedsContactLog, response payload
ServerInfonestedhostname, address, port, version
InvocationStatsnesteddurations, epsilon, model, error

Links: hasFinalResult, scoringData → open CustomerFeatureDocument; embedsContactLog; hasResponsePayload; respondsTo

Campaign context

ClassRole
CampaignContextIsolated runtime unit (campaign / predictor name)
GlobalSettingsProperties: plugins, logging, offer matrix, param lookup, corpora
FeatureLookupConfigOpen customer/feature DB lookup
DynamicEngagementConfigAlgorithm + contextual variables corpora
OptionOptions-store arm; optionKey joins OfferMatrixEntry
ScoringParamsInternal pipeline bag for plugins

Links: hasOfferMatrix (fixed rows), hasFeatureLookup (open docs), hasDynamicEngagement, plugin uses*

Plugins

ClassConfig key
PrePredictPluginplugin.prescore
PostPredictPluginplugin.postscore
RewardPluginplugin.reward

MCP & agent grounding

The runtime exposes its ontology for AI agents via MCP resources and validation tools on POST {RUNTIME}/mcp:

MCP resourcePurpose
ontology://runtimeModule summary and entry points
ontology://runtime/closed-loopCanonical agent recipe (markdown)
ontology://runtime/examplesAnnotated ContactLog / ResponseLog examples
ontology://runtime/concept/{name}Concept card (e.g. InvocationRequest)
MCP toolPurpose
getClosedLoopRecipeJSON workflow: listCampaigns → validate → invoke → validate → response
lookupRuntimeConceptSearch concepts by name, label, or related MCP tool
validateInvokeRequestPre-flight InvocationRequest before invoke
validateResponseRequestPre-flight ResponseFeedback before response

REST mirror: GET /ontology/runtime/* and POST /ontology/runtime/validate/* on the Java runtime. See MCP Support.

Full tables: Runtime Catalog · Concept Index

Download: /ontology/runtime.ttl · shapes: /ontology/runtime-shapes.ttl

Last updated on