write_reflexion
Record an agent's self-critique after each run to capture successes, improvement areas, missing context, and tool needs, enabling continuous learning and self-improvement.
Instructions
Stage 11: Record an agent self-critique entry to the reflexion_log.
Called at the end of every agent run to capture experience: what worked,
what could be better, what context was missing, what tools were needed.
Entries are reviewed by the weekly Coach loop for self-improvement proposals.
Args:
session_id: Pipeline session ID from session_bootstrap().
agent_slug: Which agent is writing the reflexion (e.g. 'librarian').
went_well: What went well in this run (1–2 sentences).
could_improve: What could have been done better (1–2 sentences).
missing_context: What context or data was unavailable but needed.
tool_wishes: Tools or capabilities that would have helped.Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | ||
| agent_slug | Yes | ||
| went_well | No | ||
| could_improve | No | ||
| missing_context | No | ||
| tool_wishes | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |