agents.memory-prune ​
Prune excess memory entries for an agent config, removing lowest-importance oldest first
Remove the lowest-importance, oldest memory entries that exceed the configured cap.
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 |
|---|---|---|---|---|
agent_config_uuid | string | Yes | — | — |
organization_uuid | string | Yes | — | — |
max_entries | integer | No | — | — |
min_importance | float | No | — | — |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
deleted | 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 | — | — |
remaining | json | No | — | — |
agent_config_uuid | json | No | — | — |
organization_uuid | json | No | — | — |
max_entries | json | No | — | — |
min_importance | 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-prune",
"initial_data": {
"agent_config_uuid": "value",
"organization_uuid": "value"
}
}