representation: "projected", the same persistent Domain evaluator fits calibrated [0, 1] event probabilities and bounded scalar expectations directly from resolved observations on continuing operational streams.
The Domain retains its observation buffer, installed evaluator (model.model_sha256), staged candidates (candidate.model_sha256), and learned parameters across updates rather than discarding state between fits. Use this workflow when your application needs a parametric scalar probability or bounded expectation over pooled numeric state. Use Probabilistic futures when you need a state-conditioned joint outcome distribution across targets, progressive multi-revision updates (future_id), or uncertainty-aware planning.
Handled automatically by default: Omitting
promotion in value/configure automatically activates prediction-gated promotion (mode: "prediction", minimum_cases: 16, required_improvement: 0, maximum_prediction_regression: 0.05), alongside representation: "projected" and max_samples: 20000. In value/train, Core defaults install: true, model_type: "mlp_v2", dimensions: 64, dense_inputs: true, epochs: 200, learning_rate: 0.003, validation_mode: "chronological", and warm_start: true (Fit 1 safely cold-starts when no incumbent exists). In value/predict, model_source defaults to "installed".Configure a persistent Domain and value learner
Send these HTTP headers and JSON serialization rules on every request:- Include
Authorization: Bearer <ADAPT1_API_KEY>, a descriptive non-defaultUser-Agent(for example,my-app/1.0; omittingUser-Agenttriggers Cloudflare HTTP403error1010on Pythonurllib),Accept: application/json, andContent-Type: application/json. - Serialize strict RFC-8259 JSON (
allow_nan=False, finite numbers only, noNaNorInfinity, and never serialize booleans as integers).
POST /api/v1/domains:
policy strictly lowercase (sla_breach_risk) and identical in value/configure, align relation across schema.relations, hypotheses[].relation, and value/configure, and keep when: [] for an unconditional value evaluator. You only need learning.context.feature_paths and learning.reward.components if the same Domain also runs /feedback contextual policy learning.
Next, configure the Domain’s value learner with POST /api/v1/domains/{domain_id}/value/configure:
representation: "projected", max_samples: 20000 (allowed range 4 to 250,000), and automatic prediction-gated promotion (mode: "prediction", minimum_cases: 16, required_improvement: 0, maximum_prediction_regression: 0.05). Under projected, Core expands compact numeric signals into its internal projected basis so mlp_v2 and linear learn calibrated readouts and feature interactions inside the Domain. Pass "representation": "object_graph" instead when modeling relational graphs (see Observations and targets).
If input paths are not authored upfront, see Discovery to let Adapt-1 form and inspect executable input views over retained evidence before fixing a schema.
Record resolved observations
Submit1 to 50 resolved observations per POST /api/v1/domains/{domain_id}/value/observe request (submitting more than 50 rows returns HTTP 422):
- Batch limit and admission: Chunk strictly to
1to50rows per request (51or more returns HTTP422), confirm thataccepted + duplicatesequals the number of rows submitted, and inspectsample_count. - Record identity (
record_id): Userecord_id(notobservation_id) to identify each row. Exact replays with the samerecord_idcount induplicates; reusing arecord_idwith changed content returns HTTP409. - Episode grouping (
episode_id): Training partitions fitting and validation folds byepisode_id. Assign concurrent rows from the same decision interval or episode the sameepisode_id(differentiated bystepandrecord_id) so correlated states never split across folds and leak cross-sectionally. - Projected feature packing: Place the first
16or fewer numeric features in flatcontext, put any overflow features beyond16inpolicy_features, and omitpolicy_featureswhen sending16or fewer features. Keep identical packing at prediction time. - Targets and numeric hygiene: Keep
targetin[0, 1]. Supply binary outcomes as0.0or1.0. For bounded continuous targets, affine-scale values into[0.02, 0.98]using bounds fitted strictly on earlier data and invert the transform on returned predictions. Standardize continuous features causally on earlier data (for example, z-scores clipped to[-6.0, 6.0]) and encode binary or entity indicators as0.0or1.0.
Fit the installed evaluator and stage candidate updates
Fitting runs asynchronously on the Domain’s retained observations so live predictions continue uninterrupted. SendPOST /api/v1/domains/{domain_id}/value/train:
- Pass
"loss_function": "log_loss"for calibrated[0, 1]binary event probabilities; omitoptions(default"squared") for bounded continuous expectations. - Core defaults
install: true,model_type: "mlp_v2",dimensions: 64,dense_inputs: true,epochs: 200,learning_rate: 0.003,validation_mode: "chronological", andwarm_start: true(Fit 1 cold-starts automatically when no incumbent exists). - Shifting streams: Pass
"validation_mode": "episode_hash"insideoptionsso the newest ~20% of episodes are not held out without refitting.
POST /api/v1/domains/{domain_id}/value/train returns HTTP 202. Poll POST /api/v1/domains/{domain_id}/value/state (POST, not GET, which returns HTTP 405):
training.request_id matches your submitted request and inspect training.status (not the top-level status: "configured" field). Keep polling while training.status is non-terminal (queued, running, pending, or in_progress). Stop polling on any terminal status (trained, candidate, retained, rejected, or failed; before any fit runs, training.status is idle):
trained: A new model is installed atmodel.model_sha256.candidate: An uninstalled candidate is staged atcandidate.model_sha256(from aninstall: falsefit).retained: Core’s automatic prediction gate kept the existing incumbent atmodel.model_sha256. On stationary streams this protects production against noisy updates; if retrains keep returningretainedduring volatility or regime shifts, expand the candidate-staging section below.rejectedorfailed: Keep serving your previous valid model (or fall back to a local baseline prior if Fit 1 did not produce a model).
Predict with the fitted evaluator
Issue and store predictions strictly before uploading realized outcomes so evaluation reflects decision-time state. Confirm invalue/state that model (or candidate) is non-null, then send POST /api/v1/domains/{domain_id}/value/predict with 1 to 256 inputs (more than 256 inputs returns HTTP 422 or 413):
model_sourcedefaults to"installed". Pass"model_source": "candidate"only when scoring a staged candidate.- Parse
predictions(orvalueswhere returned; each item can be a number or an object containingvalueorprediction) and confirm the returned count matcheslen(inputs). - Clip binary probability outputs to
[1e-6, 1 - 1e-6]before computing log-loss. - Add optional
expected_model_sha256(set tomodel.model_sha256orcandidate.model_sha256) and verify the echoed hash (model_sha256orevaluator.model_sha256) whenever you need strict serving provenance.
Advanced drift, tuning, and production controls
Expand the sections below when operating under non-stationary drift, tuning stream-specific capacity, reviewing candidate inputs with Transition Discovery, or adding production governance controls.Adapting under non-stationary drift or sliding windows (install: false candidate staging)
Adapting under non-stationary drift or sliding windows (install: false candidate staging)
In
prediction promotion mode, retraining over an existing incumbent with install: true evaluates the new fit against the incumbent’s promotion gate and finishes with training.status: retained whenever the incumbent is kept. On non-stationary streams where rising volatility or shifting base rates increase irreducible event entropy, a strict validation-loss gate can retain an older calm-regime incumbent across most blocks even when relaxing maximum_prediction_regression. Furthermore, passing explicit observation_ids together with install: true over an existing incumbent returns HTTP 422 in prediction mode (selected observation continuation requires install=false or application-outcome promotion).Adapt-1 separates staging a candidate (install: false, producing candidate.model_sha256) from mutating the installed incumbent (install: true or explicit value/promote) as a governance primitive. Staging candidates over a trailing window W of record_id values lets your evaluator adapt through regime shifts without validation-gate lockouts while preserving the incumbent for fallback or audited promotion.Follow this 3-stage sliding-window protocol inside the Domain’s max_samples buffer (4 to 250,000):- Block 0 (establish the installed evaluator,
install: true): Seed your initial trailing windowWof resolved observations and fit withinstall: true,options.warm_start: false, and noobservation_ids. Whentraining.statusistrained, recordmodel.model_sha256(an installed incumbent is required beforewarm_start_source: "candidate"can run). Serve initial predictions withmodel_source: "installed"and optionalexpected_model_sha256. - Block 1 (stage the first subset candidate,
install: false): Pass the latest trailing windowWofrecord_idvalues inobservation_ids, setinstall: false, and supply a newrequest_id. For warm continuation from retained weights, setoptions.warm_start: true,warm_start_source: "installed", andexpected_initial_model_sha256tomodel.model_sha256. Whentraining.statusiscandidate, savecandidate.model_sha256and serve or evaluate it withmodel_source: "candidate"andexpected_model_sha256. - Block 2+ (continue staging across subsequent subsets,
install: false): Pass the updated trailing windowWofrecord_idvalues inobservation_idswithinstall: falseand a newrequest_id. For warm continuation, setoptions.warm_start: true,warm_start_source: "candidate", andexpected_initial_model_sha256to the latest validcandidate.model_sha256(fall back towarm_start_source: "installed"andmodel.model_sha256if no candidate has succeeded yet).
422 guard: Whenever you perform a cold refit (options.warm_start: false), omit both warm_start_source and expected_initial_model_sha256. Sending warm_start_source: "candidate" without expected_initial_model_sha256 returns HTTP 422 (candidate warm starts require expected_initial_model_sha256) even when warm_start is false.If a fit finishes with rejected (for example, validation_checks.reason: candidate_failed_validation or collapsed_predictions), retained, or failed, keep predicting from the previous confirmed model_source and SHA, or fall back to a local baseline prior if Block 0 failed to produce a model.Tuning for stream dynamics (optional starting configurations and default caveats)
Tuning for stream dynamics (optional starting configurations and default caveats)
Select training options along the value API’s structural axes and validate them on earlier historical partitions before deployment:
Treat these empirical profiles as starting configurations to validate on earlier data, not universal defaults:
Match model capacity, validation splits, and warm continuation to stream dynamics:
- Shifting pooled regimes: Because
validation_mode: "chronological"holds out the newest ~20% of episodes without refitting on them, prefermlp_v2,validation_mode: "episode_hash"with a shared intervalepisode_id, and warm-started candidate staging (install: false,warm_start: true) so recent observations enter training while concurrent rows stay grouped. Always evaluate generalization chronologically on held-out future steps. - Stationary rare events: For low-base-rate binary events under stable dynamics, prefer compact
mlp_v2capacity (dimensions: 16,dense_hidden_dimensions: 8),loss_function: "log_loss",validation_mode: "chronological", and cold refits (warm_start: false) to protect tail calibration (continuouswarm_start: trueon rare-eventlog_lossstreams can inflate predicted base rates). - Seasonal or smaller subsets: When sample support is smaller or a compact linear readout over Adapt-1’s projected basis generalizes better than a deeper network, prefer
model_type: "linear"withwarm_start: falseandvalidation_mode: "episode_hash", omittinginteraction_selection. - Watch
warm_start: trueunder drift: On rapidly drifting streams,warm_start: truecan selectselected_epoch: 0(leaving incoming parameters unchanged). Inspecttraining.report.selected_epochand use a cold refit (warm_start: false) if updates stall. - Numeric
422option guardrails:dense_inputsdefaults totrue, so omit it (or leavetrue) onmlp_v2andlinear(dense_inputs: falsereturns HTTP422). Never setpair_geometry: trueorquadratic_pairs: trueonmlp_v2orlinear(those flags belong only toobject_valueand return HTTP422). Settingfunction_retention_weightabove0requireswarm_start: true(warm_start: falsereturns HTTP422). Very wide and long snapshots can hit the dense worker cap (HTTP 422: dense training matrix exceeds worker limit); compact feature width or window size if encountered.
Review candidate inputs with Transition Discovery
Review candidate inputs with Transition Discovery
You can run Transition Discovery on an earlier calibration partition (
input_paths: [] with autonomous_projection.enabled: true) to identify a compact set of predictive input paths before configuring the value learner. Compact discovered subsets fit cleanly within /value/*’s 16-feature flat context surface without overflowing into policy_features. Because marginal screening can drop slow regime or cross-entity indicators that matter mainly during rare shifts, pin essential structural keys such as entity or slow regime indicators while letting Discovery select covariates. Always validate a discovered input subset against the full reviewed input surface on a held-out partition before pinning it.Production controls: promotion, freeze, concurrency, storage quota, and retries
Production controls: promotion, freeze, concurrency, storage quota, and retries
- Explicit candidate promotion: When promoting a verified candidate over an existing incumbent via
POST /value/promote, supply bothexpected_model_sha256andexpected_current_model_sha256(omittingexpected_current_model_sha256returns HTTP409). See Promotion. - Frozen evaluation: Lock the installed model with Freeze; while frozen,
value/trainreturns HTTP409until you call Reset. - Owner-wide fit serialization: Only one value fit runs at a time per authenticated owner across Domains (
HTTP 409: one value fit may run per owner); serialize fits and retry with bounded backoff after the active fit completes. See Schedule fits for one owner. - Storage quota and retries: Size
max_samplesto your account quota and delete unused Domains (DELETEconfirmed byGETreturning404) to prevent HTTP402storage errors. Treat read-onlyPOST /value/stateandPOST /value/predictas retryable under an idempotent read policy, and reconcile state-mutatingPOSTroutes throughvalue/statebefore retrying. See Errors and reliability and Operations and retries.
object_graph / object_value workflows, full training reports, explicit candidate promotion, freeze/reset controls, and complete request schemas, see Value learning, Training and reports, Promotion, and Value API reference.