Class: AgUiProtocol::Core::Capabilities::ToolsCapabilities

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

Overview

Tool calling capabilities.

Distinguishes between tools the agent itself provides (listed in ‘items`) and tools the client passes at runtime via `RunAgentInput.tools`. Enable this when your agent can call functions, search the web, execute code, etc.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Types::Model

#as_json, #to_json

Constructor Details

#initialize(supported: nil, items: nil, parallel_calls: nil, client_provided: nil) ⇒ ToolsCapabilities

Returns a new instance of ToolsCapabilities.



207
208
209
210
211
212
213
214
# File 'lib/ag_ui_protocol/core/capabilities.rb', line 207

def initialize(
  supported: nil, items: nil, parallel_calls: nil, client_provided: nil
)
  @supported = supported
  @items = items
  @parallel_calls = parallel_calls
  @client_provided = client_provided
end

Instance Attribute Details

#client_providedObject (readonly)

Returns the value of attribute client_provided.



193
194
195
# File 'lib/ag_ui_protocol/core/capabilities.rb', line 193

def client_provided
  @client_provided
end

#itemsObject (readonly)

Returns the value of attribute items.



187
188
189
# File 'lib/ag_ui_protocol/core/capabilities.rb', line 187

def items
  @items
end

#parallel_callsObject (readonly)

Returns the value of attribute parallel_calls.



190
191
192
# File 'lib/ag_ui_protocol/core/capabilities.rb', line 190

def parallel_calls
  @parallel_calls
end

#supportedObject (readonly)

Returns the value of attribute supported.



184
185
186
# File 'lib/ag_ui_protocol/core/capabilities.rb', line 184

def supported
  @supported
end

Instance Method Details

#to_hObject



217
218
219
220
221
222
223
224
# File 'lib/ag_ui_protocol/core/capabilities.rb', line 217

def to_h
  {
    supported: @supported,
    items: @items,
    parallel_calls: @parallel_calls,
    client_provided: @client_provided
  }
end