Omni.Agent.Snapshot (Omni Agent v0.4.0)

Copy Markdown View Source

A consistent view of an Omni.Agent at a point in time.

Returned by Omni.Agent.get_snapshot/1 and Omni.Agent.subscribe/1,2. Consumers who want the complete set of messages the agent knows about right now compose:

state.messages ++ pending ++ List.wrap(partial)

Fields:

  • :state — the public %Omni.Agent.State{} (committed history, model, tools, status, ...)
  • :pending — messages accumulated during the in-flight turn, not yet committed to state.messages
  • :partial — the assistant message currently streaming, or nil if no step is in progress

Summary

Types

t()

An Agent snapshot.

Types

t()

@type t() :: %Omni.Agent.Snapshot{
  partial: Omni.Message.t() | nil,
  pending: [Omni.Message.t()],
  state: Omni.Agent.State.t()
}

An Agent snapshot.