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 ​
| Property | Value |
|---|---|
| Workflow type | Linear |
| Library | App-agents |
| Version | 1.0 |
Triggers ​
| Source | Endpoint / Event | Description |
|---|---|---|
| INTERNAL | internal.invocation | Internal — called by the agents platform during session execution |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
session_uuid | string | Yes | — | — |
agent_config_uuid | string | Yes | — | — |
organization_uuid | string | Yes | — | — |
outcome | string | Yes | — | How the session resolved: 'success' or 'failed'. |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
distilled | json | No | — | — |
skipped_reason | string | No | — | — |
entries | json | No | — | — |
error | string | No | — | — |
error_type | string | No | — | — |
failed_at | string | No | — | — |
failed_at_state | string | No | — | — |
failed_layer | json | No | — | — |
failed_step | string | No | — | — |
failure_reason | string | No | — | — |
session_uuid | json | No | — | — |
agent_config_uuid | json | No | — | — |
organization_uuid | json | No | — | — |
outcome | json | No | — | — |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
initiated | Yes | No | — | run | — |
run | No | No | — | complete | — |
completed | No | Yes | Yes | — | — |
failed | No | Yes | No | — | — |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
initiated | run | run | — |
run | complete | completed | — |
* (any state) | fail | failed | — |
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"
}
}