Class: Phronomy::Agent::StreamEvent

Inherits:
Data
  • Object
show all
Defined in:
lib/phronomy/agent.rb

Overview

Represents a single event emitted during a streaming agent invocation.

type values: :token — a content delta from the LLM (payload: { content: String }) :tool_call — the LLM requested a tool call (payload: { tool_call: Object }) :tool_result — a tool finished executing (payload: { tool_call_id: String, tool_name: String, tool_result: Object }) :done — the agent finished (payload: { output: String, messages: Array, usage: TokenUsage }) :error — an unrecoverable error occurred (payload: { error: Exception })

Instance Attribute Summary collapse

Instance Attribute Details

#payloadObject (readonly)

Returns the value of attribute payload

Returns:

  • (Object)

    the current value of payload



15
16
17
# File 'lib/phronomy/agent.rb', line 15

def payload
  @payload
end

#typeObject (readonly)

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



15
16
17
# File 'lib/phronomy/agent.rb', line 15

def type
  @type
end