chatlog_write
Append a chat turn to the chat log with required provenance. Async-queued write returns the row ID immediately.
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 | ||
| timeout | No | ||
| 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 |