Skip to content
Proud to collaborate with Microsoft for Startups

agents.memory-distill ​

Distill a finished agent session into memory entries, gated on the config's memory_write_enabled flag

Turn a finished session into memory entries.

The writer, per ADR-2026-08-21-memory-write-policy. Started fire-and-forget from both finalize workflows -- COMPLETED and FAILED -- and never awaited: distillation is an LLM round-trip, and finalize is what marks a session done. Blocking it would make every session slower and make memory an availability risk for the thing it exists to help.

Everything it can fail on is caught. A session that produced no memory is a session that produced no memory; it is not a failed session.

Overview ​

PropertyValue
Workflow typeLinear
LibraryApp-agents
Version1.0

Triggers ​

SourceEndpoint / EventDescription
INTERNALinternal.invocationInternal — called by the agents platform during session execution

Input Schema ​

FieldTypeRequiredDefaultDescription
session_uuidstringYes——
agent_config_uuidstringYes——
organization_uuidstringYes——
outcomestringYes—How the session resolved: 'success' or 'failed'.

Output Schema ​

FieldTypeRequiredDefaultDescription
distilledjsonNo——
skipped_reasonstringNo——
entriesjsonNo——
errorstringNo——
error_typestringNo——
failed_atstringNo——
failed_at_statestringNo——
failed_layerjsonNo——
failed_stepstringNo——
failure_reasonstringNo——
session_uuidjsonNo——
agent_config_uuidjsonNo——
organization_uuidjsonNo——
outcomejsonNo——

States ​

StateInitialTerminalSuccessAuto-advanceDescription
initiatedYesNo—run—
runNoNo—complete—
completedNoYesYes——
failedNoYesNo——

State Diagram ​

Transitions ​

FromActionToDescription
initiatedrunrun—
runcompletecompleted—
* (any state)failfailed—

API Usage ​

bash
POST /api/workflows/start
Content-Type: application/json

{
  "workflow_type": "agents.memory-distill",
  "initial_data": {
    "session_uuid": "value",
    "agent_config_uuid": "value",
    "organization_uuid": "value",
    "outcome": "value"
  }
}