# `Octoroom.Agent.ConversationEvents`
[🔗](https://github.com/samrat/octoroom/blob/v0.1.0/agents/lib/octoroom/agent/conversation_events.ex#L1)

Accumulates observed text and emits finalized conversation items to the owner.

An assistant reply that's spoken is emitted twice with the same
`message_id`: `:playing` when its text is done and its audio is playing,
then `:completed` once it played to the end, or `:interrupted` with only
the words that were heard. Without TTS, `:completed` means the text is
done. Interrupted/failed items contain only text observed before that
boundary.
This event ledger is separate from the model's history and does not persist it.

# `append`

# `commit`

# `commit_reserved`

Emits a reserved item. Its sequence may be lower than items already emitted.

# `new`

# `replace`

# `reserve`

Reserves the next sequence number for an item whose text arrives later, such
as a user turn heard as audio and transcribed in the background. Returns
`{state, reservation}`; pass the reservation to `commit_reserved/4`.

# `update_reserved`

Emits a reserved item, or a new version of one already emitted (same
`message_id` and `sequence`), even with empty text: an assistant reply
shown as `:playing` and then cut off before any of it was heard.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
