log_event
Record raw user-assistant-tool exchanges verbatim so the memory engine can later extract facts. Use when hooks are absent or an exchange must be preserved exactly.
Instructions
Record a raw exchange — a user message, your response, a tool call, a tool result, an artifact — as the episodic record consolidation later extracts facts from. Logging both sides gives that extraction the context to know what a reply refers to.
Where the client has hooks configured, every event is logged for you automatically and you do not need to call this at all. Call it when there are no hooks, or when an exchange matters enough to preserve verbatim — a decision, a correction, a specification — and you want it recorded whether or not hooks are running. Duplicates are reconciled at consolidation, so logging something twice is safe.
To store a fact you already know, use capture_fact instead: this tool records what was said, not what it means.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| role | Yes | Channel that produced this event (user, assistant, system, tool). For a named person on a group transcript, keep role as user and pass speaker. | |
| content | Yes | Text content of the event | |
| speaker | No | Named participant when the transcript has one (e.g. Alex). Role stays the channel — do not invent a person role. | |
| metadata | No | Arbitrary metadata | |
| event_type | Yes | Type of event | |
| content_ref | No | URI or path for non-text content | |
| content_type | No | How to interpret the content. Defaults to 'text' for messages. Use 'json' for structured data, 'image' for screenshots or generated images, 'audio' for voice or audio clips, 'binary' for anything else non-text. | text |