Skip to content

Action-Outcome Episode Schema

Date: 2026-06-13 Branch: codex/aiops-time-series-memory-research

This schema defines the first research fixture format for Action-Outcome Memory. It is intentionally product-shaped but still simple enough for replay experiments.

An episode represents:

situation -> hypothesis -> policy decision -> action -> observation -> outcome -> reflection
FieldTypeRequiredDescription
episode_idstringyesStable fixture id.
incident_idstringyesIncident or synthetic incident id.
incident_typestringyesNormalized incident family.
servicestringyesPrimary affected service.
environmentstringyesEnvironment or site.
entity_refsarray of stringsyesAffected pods, hosts, queues, regions, devices, or dependencies.
pre_action_windowobjectyesEvent-time window before the action.
action_tsstringyesEvent-time timestamp for the action.
post_action_windowobjectyesEvent-time window used to evaluate recovery.
symptomsobjectyesAlerts, metric deviations, log signatures, trace symptoms.
topology_contextobjectyesRelevant service/dependency topology.
change_contextobjectyesDeploy, config, feature flag, migration, or other change context.
candidate_root_causesarray of objectsyesRoot-cause hypotheses considered before or during action.
actionobjectyesAction class, parameters, actor, and target.
policy_decisionobjectyesAllow/deny/escalate decision, risk tier, and approval.
rollback_planobjectyesReversal plan and whether it was executed.
machine_outcome_labelobjectyesOutcome inferred from post-action telemetry.
human_outcome_labelobjectyesHuman or postmortem label.
recovery_curveobjectyesCompact pre/post metric deltas.
evidence_refsarray of objectsyesReferences to telemetry windows, logs, traces, tickets, or memory records.
reflectionstringyesReusable lesson for future agents.
tagsarray of stringsyesSearch and ablation tags.
{
"start": "2026-06-13T10:00:00Z",
"end": "2026-06-13T10:05:00Z"
}

Rules:

  • Use UTC ISO-8601 timestamps.
  • pre_action_window.end must be less than or equal to action_ts.
  • post_action_window.start must be greater than or equal to action_ts.

Recommended fields:

FieldTypeDescription
alertsarray of stringsAlert names or monitor ids.
metricsobjectKey metric values or deltas.
logsarray of stringsLog templates or normalized signatures.
tracesarray of stringsTrace/span symptoms.
{
"cause": "payment_client_pool_exhaustion",
"confidence": 0.72,
"evidence": ["checkout p99 latency rose after deploy", "payment spans saturated"]
}

Rules:

  • Confidence is a fixture label between 0.0 and 1.0.
  • Evidence should reference observed signals, not unsupported explanation.
{
"action_class": "rollback",
"target": "checkout",
"parameters": {"deploy_id": "deploy_42", "rollback_to": "deploy_41"},
"actor": "human_oncall",
"tool": "deployment_controller"
}

Initial allowed action classes:

  • restart
  • scale_out
  • rollback
  • traffic_drain
  • cache_purge
  • config_revert
  • queue_reset
  • no_action
{
"decision": "allow",
"risk_tier": "medium",
"approval": "human_required",
"approver": "oncall_lead",
"reason": "rollback is reversible and affects one service"
}

Allowed decisions:

  • allow
  • deny
  • escalate
  • shadow_only

Allowed risk tiers:

  • low
  • medium
  • high
  • critical
{
"label": "success",
"assigned_by": "post_action_metric_rule",
"confidence": 0.9,
"notes": "p95 latency returned below SLO within 8 minutes"
}

Allowed labels:

  • success
  • partial_success
  • failure
  • rollback_required
  • unsafe
  • insufficient_evidence

Recommended fields:

FieldTypeDescription
primary_metricstringMain metric used to judge recovery.
beforenumberValue near action time.
after_5mnumberValue 5 minutes after action.
after_15mnumberValue 15 minutes after action.
unitstringMetric unit.
slo_restoredbooleanWhether the service returned to target.
side_effectsarray of stringsNew alerts or regressions after action.
{
"type": "metric_window",
"ref": "zeptodb://observability_metrics?service=checkout&start=...",
"description": "checkout latency and error window"
}

Recommended types:

  • metric_window
  • log_window
  • trace_window
  • topology_snapshot
  • deploy_event
  • ticket
  • postmortem
  • agent_trace
  • memory_record

The first fixture must include:

  • At least 5 incident types.
  • At least 4 episodes per incident type.
  • At least one success and one failure/rollback per incident type.
  • Multiple action classes.
  • Both machine and human outcome labels.
  • Event-time windows for pre-action and post-action context.
  • Negative outcomes preserved as first-class examples.

For the first prototype:

  • Store this fixture as JSON for easy replay.
  • Later map episodes into ZeptoDB tables:
    • incident_events
    • incident_windows
    • change_events
    • remediation_actions
    • recovery_observations
    • action_outcomes
  • Store reflection fields as Agent Memory records of type remediation_outcome or failure_signature.