Machine-actionable result
The application consumes the contract-defined policy result directly.
No generated language required
response
prediction
<output_key>
structured policy result
adapt/events
Updates policy state from the submitted observation and returns its current prediction.
adapt/predict
Reads the same output contract without adding another observation.
Downstream boundary
Validate, display, route, or execute the object in application code.
Workflow
declare domain → reset known state → send ordered observations → read prediction → validate or act → continueGateways
Input mapping
When the application’s input fields differ from the domain’s declared observation fields, an optional mapping can translate them. If the fields already match, the application can send the observation directly. Adapt-1 updates the policy state and returns the contract-defined structured prediction; another optional mapping can select or rename output fields for the consumer’s schema.Validation
Assert on the object underprediction.<output_key>. Check schema validity, the required business condition, and whether reset followed by the same ordered observations reproduces the expected result.
Use the adaptive response to inspect the interval-policy result. Domain reasoning audit data is available through /explain.
Route contracts
POST /api/v1/domains/{domain_id}/adapt/eventsupdates policy state and returns a structured prediction.POST /api/v1/domains/{domain_id}/adapt/predictreads the current prediction without adding an observation.POST /api/v1/domains/{domain_id}/eventsrecords a normal domain event.POST /api/v1/domains/{domain_id}/queryandPOST /api/v1/domains/{domain_id}/explainreturn domain reasoning and audit fields.POST /api/v1/domains/{domain_id}/feedbackreports an outcome.
