Class: AgUiProtocol::Core::Capabilities::AgentCapabilities

Inherits:
Types::Model
  • Object
show all
Defined in:
lib/ag_ui_protocol/core/capabilities.rb

Overview

A categorized snapshot of an agent’s current capabilities.

All fields are optional — agents only declare what they support. Omitted fields mean the capability is not declared (unknown), not that it’s unsupported.

The ‘custom` field is an escape hatch for integration-specific capabilities that don’t fit into the standard categories.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Types::Model

#as_json, #to_json

Constructor Details

#initialize(identity: nil, transport: nil, tools: nil, output: nil, state: nil, multi_agent: nil, reasoning: nil, multimodal: nil, execution: nil, human_in_the_loop: nil, custom: nil) ⇒ AgentCapabilities

Returns a new instance of AgentCapabilities.



694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
# File 'lib/ag_ui_protocol/core/capabilities.rb', line 694

def initialize(
  identity: nil, transport: nil, tools: nil, output: nil,
  state: nil, multi_agent: nil, reasoning: nil, multimodal: nil,
  execution: nil, human_in_the_loop: nil, custom: nil
)
  @identity = identity
  @transport = transport
  @tools = tools
  @output = output
  @state = state
  @multi_agent = multi_agent
  @reasoning = reasoning
  @multimodal = multimodal
  @execution = execution
  @human_in_the_loop = human_in_the_loop
  @custom = custom
end

Instance Attribute Details

#customObject (readonly)

Returns the value of attribute custom.



666
667
668
# File 'lib/ag_ui_protocol/core/capabilities.rb', line 666

def custom
  @custom
end

#executionObject (readonly)

Returns the value of attribute execution.



660
661
662
# File 'lib/ag_ui_protocol/core/capabilities.rb', line 660

def execution
  @execution
end

#human_in_the_loopObject (readonly)

Returns the value of attribute human_in_the_loop.



663
664
665
# File 'lib/ag_ui_protocol/core/capabilities.rb', line 663

def human_in_the_loop
  @human_in_the_loop
end

#identityObject (readonly)

Returns the value of attribute identity.



636
637
638
# File 'lib/ag_ui_protocol/core/capabilities.rb', line 636

def identity
  @identity
end

#multi_agentObject (readonly)

Returns the value of attribute multi_agent.



651
652
653
# File 'lib/ag_ui_protocol/core/capabilities.rb', line 651

def multi_agent
  @multi_agent
end

#multimodalObject (readonly)

Returns the value of attribute multimodal.



657
658
659
# File 'lib/ag_ui_protocol/core/capabilities.rb', line 657

def multimodal
  @multimodal
end

#outputObject (readonly)

Returns the value of attribute output.



645
646
647
# File 'lib/ag_ui_protocol/core/capabilities.rb', line 645

def output
  @output
end

#reasoningObject (readonly)

Returns the value of attribute reasoning.



654
655
656
# File 'lib/ag_ui_protocol/core/capabilities.rb', line 654

def reasoning
  @reasoning
end

#stateObject (readonly)

Returns the value of attribute state.



648
649
650
# File 'lib/ag_ui_protocol/core/capabilities.rb', line 648

def state
  @state
end

#toolsObject (readonly)

Returns the value of attribute tools.



642
643
644
# File 'lib/ag_ui_protocol/core/capabilities.rb', line 642

def tools
  @tools
end

#transportObject (readonly)

Returns the value of attribute transport.



639
640
641
# File 'lib/ag_ui_protocol/core/capabilities.rb', line 639

def transport
  @transport
end

Instance Method Details

#to_hObject



713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
# File 'lib/ag_ui_protocol/core/capabilities.rb', line 713

def to_h
  {
    identity: @identity,
    transport: @transport,
    tools: @tools,
    output: @output,
    state: @state,
    multi_agent: @multi_agent,
    reasoning: @reasoning,
    multimodal: @multimodal,
    execution: @execution,
    human_in_the_loop: @human_in_the_loop,
    # `custom` is the explicit escape hatch for integration-specific
    # capabilities — preserve keys verbatim.
    custom: @custom.nil? ? nil : AgUiProtocol::Util::Opaque.new(@custom)
  }
end