chatlog_write
Append a chat turn to the persistent memory log with provenance details. Returns row ID immediately via async queue.
Instructions
Append one chat turn to the chat log DB. Provenance (host_agent, provider, model_id, conversation_id) is required. Writes are async-queued — returns the row id immediately.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| role | Yes | ||
| content | Yes | ||
| user_id | No | ||
| agent_id | No | ||
| cost_usd | No | ||
| database | No | ||
| metadata | No | {} | |
| model_id | Yes | ||
| provider | Yes | ||
| tokens_in | No | ||
| host_agent | Yes | ||
| latency_ms | No | ||
| tokens_out | No | ||
| turn_index | No | ||
| conversation_id | Yes |