Skip to main content
Adapt-1’s stateful value learner is the persistent, versioned parametric evaluator inside a Domain. In value learning and native planning, this evaluator scores unfinished states and legal continuations while the Domain accumulates episodic history. With 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-default User-Agent (for example, my-app/1.0; omitting User-Agent triggers Cloudflare HTTP 403 error 1010 on Python urllib), Accept: application/json, and Content-Type: application/json.
  • Serialize strict RFC-8259 JSON (allow_nan=False, finite numbers only, no NaN or Infinity, and never serialize booleans as integers).
Create a persistent Domain with a relation, a matching lowercase policy, and numeric signals via POST /api/v1/domains:
Keep 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:
Omitting optional keys automatically applies 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

Submit 1 to 50 resolved observations per POST /api/v1/domains/{domain_id}/value/observe request (submitting more than 50 rows returns HTTP 422):
Follow these observation and grouping rules:
  • Batch limit and admission: Chunk strictly to 1 to 50 rows per request (51 or more returns HTTP 422), confirm that accepted + duplicates equals the number of rows submitted, and inspect sample_count.
  • Record identity (record_id): Use record_id (not observation_id) to identify each row. Exact replays with the same record_id count in duplicates; reusing a record_id with changed content returns HTTP 409.
  • Episode grouping (episode_id): Training partitions fitting and validation folds by episode_id. Assign concurrent rows from the same decision interval or episode the same episode_id (differentiated by step and record_id) so correlated states never split across folds and leak cross-sectionally.
  • Projected feature packing: Place the first 16 or fewer numeric features in flat context, put any overflow features beyond 16 in policy_features, and omit policy_features when sending 16 or fewer features. Keep identical packing at prediction time.
  • Targets and numeric hygiene: Keep target in [0, 1]. Supply binary outcomes as 0.0 or 1.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 as 0.0 or 1.0.
See Observations and targets for batch sizing by byte margin and Observe for endpoint limits.

Fit the installed evaluator and stage candidate updates

Fitting runs asynchronously on the Domain’s retained observations so live predictions continue uninterrupted. Send POST /api/v1/domains/{domain_id}/value/train:
  • Pass "loss_function": "log_loss" for calibrated [0, 1] binary event probabilities; omit options (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", and warm_start: true (Fit 1 cold-starts automatically when no incumbent exists).
  • Shifting streams: Pass "validation_mode": "episode_hash" inside options so 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):
Verify that 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 at model.model_sha256.
  • candidate: An uninstalled candidate is staged at candidate.model_sha256 (from an install: false fit).
  • retained: Core’s automatic prediction gate kept the existing incumbent at model.model_sha256. On stationary streams this protects production against noisy updates; if retrains keep returning retained during volatility or regime shifts, expand the candidate-staging section below.
  • rejected or failed: Keep serving your previous valid model (or fall back to a local baseline prior if Fit 1 did not produce a model).
See State and Training and reports for full status and report diagnostics.

Predict with the fitted evaluator

Issue and store predictions strictly before uploading realized outcomes so evaluation reflects decision-time state. Confirm in value/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_source defaults to "installed". Pass "model_source": "candidate" only when scoring a staged candidate.
  • Parse predictions (or values where returned; each item can be a number or an object containing value or prediction) and confirm the returned count matches len(inputs).
  • Clip binary probability outputs to [1e-6, 1 - 1e-6] before computing log-loss.
  • Add optional expected_model_sha256 (set to model.model_sha256 or candidate.model_sha256) and verify the echoed hash (model_sha256 or evaluator.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.
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):
  1. Block 0 (establish the installed evaluator, install: true): Seed your initial trailing window W of resolved observations and fit with install: true, options.warm_start: false, and no observation_ids. When training.status is trained, record model.model_sha256 (an installed incumbent is required before warm_start_source: "candidate" can run). Serve initial predictions with model_source: "installed" and optional expected_model_sha256.
  2. Block 1 (stage the first subset candidate, install: false): Pass the latest trailing window W of record_id values in observation_ids, set install: false, and supply a new request_id. For warm continuation from retained weights, set options.warm_start: true, warm_start_source: "installed", and expected_initial_model_sha256 to model.model_sha256. When training.status is candidate, save candidate.model_sha256 and serve or evaluate it with model_source: "candidate" and expected_model_sha256.
  3. Block 2+ (continue staging across subsequent subsets, install: false): Pass the updated trailing window W of record_id values in observation_ids with install: false and a new request_id. For warm continuation, set options.warm_start: true, warm_start_source: "candidate", and expected_initial_model_sha256 to the latest valid candidate.model_sha256 (fall back to warm_start_source: "installed" and model.model_sha256 if no candidate has succeeded yet).
Cold-refit 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.
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, prefer mlp_v2, validation_mode: "episode_hash" with a shared interval episode_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_v2 capacity (dimensions: 16, dense_hidden_dimensions: 8), loss_function: "log_loss", validation_mode: "chronological", and cold refits (warm_start: false) to protect tail calibration (continuous warm_start: true on rare-event log_loss streams 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" with warm_start: false and validation_mode: "episode_hash", omitting interaction_selection.
  • Watch warm_start: true under drift: On rapidly drifting streams, warm_start: true can select selected_epoch: 0 (leaving incoming parameters unchanged). Inspect training.report.selected_epoch and use a cold refit (warm_start: false) if updates stall.
  • Numeric 422 option guardrails: dense_inputs defaults to true, so omit it (or leave true) on mlp_v2 and linear (dense_inputs: false returns HTTP 422). Never set pair_geometry: true or quadratic_pairs: true on mlp_v2 or linear (those flags belong only to object_value and return HTTP 422). Setting function_retention_weight above 0 requires warm_start: true (warm_start: false returns HTTP 422). 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.
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.
  • Explicit candidate promotion: When promoting a verified candidate over an existing incumbent via POST /value/promote, supply both expected_model_sha256 and expected_current_model_sha256 (omitting expected_current_model_sha256 returns HTTP 409). See Promotion.
  • Frozen evaluation: Lock the installed model with Freeze; while frozen, value/train returns HTTP 409 until 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_samples to your account quota and delete unused Domains (DELETE confirmed by GET returning 404) to prevent HTTP 402 storage errors. Treat read-only POST /value/state and POST /value/predict as retryable under an idempotent read policy, and reconcile state-mutating POST routes through value/state before retrying. See Errors and reliability and Operations and retries.
For 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.