episode_add
Save a structured episode to agent memory. Specify type and content; for DECISION type, include rationale in metadata.
Instructions
Persist a structured episode in long-term agent memory. Required: type (one of: OBSERVATION, DECISION, EDIT, TEST_RESULT, ERROR, REFLECTION, LEARNING) and content (the episode text). IMPORTANT: DECISION type also requires metadata: { rationale: '...' } — omitting it returns an error. Optional: entities (related file/symbol names), taskId, outcome (success | failure | partial), sensitive (exclude from default recalls).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | Episode type | |
| content | Yes | Episode content | |
| entities | No | Related graph entity IDs | |
| taskId | No | Related task ID | |
| outcome | No | Outcome classification | |
| metadata | No | Extra metadata | |
| sensitive | No | Exclude from default recalls | |
| agentId | No | Agent identifier | |
| sessionId | No | Session identifier | |
| profile | No | Response profile | compact |