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

Frames are the structs that processors pass to each other.

Every frame has a category:

  * `:system` - handled before queued frames and never dropped by an
    interruption (for example `Interruption`, VAD events, input audio)
  * `:data` - delivered in order; dropped by an interruption unless the
    frame is marked `uninterruptible`
  * `:control` - like `:data`, for markers such as `LLMResponseStart`

Every frame also has an `:id`, which the runner sets the first time the
frame is pushed.

Define a frame of your own with `use Octoroom.Agent.Frame`:

    defmodule MyApp.Frames.Sentiment do
      use Octoroom.Agent.Frame, category: :data, fields: [:label, score: 0.0]
    end

Structs that don't `use Octoroom.Agent.Frame` can still be pushed; they count as
interruptible `:data` frames.

# `category`

The frame's category: `:system`, `:data` or `:control`.

# `defframe`
*macro* 

Defines a frame module nested in the calling module.

    defframe Transcription, :data, fields: [:text], uninterruptible: true

# `system?`

True for system frames.

# `uninterruptible?`

True if the frame is marked `uninterruptible`. An interruption keeps these
frames queued, and doesn't kill tasks started while handling them. (System
frames are never dropped either, but tasks started for them are killed.)

---

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