Class: Spatio::AgentsApi

Inherits:
Object
  • Object
show all
Defined in:
lib/spatio-sdk/api/agents_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ AgentsApi

Returns a new instance of AgentsApi.



19
20
21
# File 'lib/spatio-sdk/api/agents_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/spatio-sdk/api/agents_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#create_agent(create_agent_request, opts = {}) ⇒ Agent

Create a new agent configuration.

Parameters:

  • create_agent_request (CreateAgentRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



26
27
28
29
# File 'lib/spatio-sdk/api/agents_api.rb', line 26

def create_agent(create_agent_request, opts = {})
  data, _status_code, _headers = create_agent_with_http_info(create_agent_request, opts)
  data
end

#create_agent_conversation(opts = {}) ⇒ AgentConversation

Create a new agent-platform conversation.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



92
93
94
95
# File 'lib/spatio-sdk/api/agents_api.rb', line 92

def create_agent_conversation(opts = {})
  data, _status_code, _headers = create_agent_conversation_with_http_info(opts)
  data
end

#create_agent_conversation_with_http_info(opts = {}) ⇒ Array<(AgentConversation, Integer, Hash)>

Create a new agent-platform conversation.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(AgentConversation, Integer, Hash)>)

    AgentConversation data, response status code and response headers



101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# File 'lib/spatio-sdk/api/agents_api.rb', line 101

def create_agent_conversation_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AgentsApi.create_agent_conversation ...'
  end
  # resource path
  local_var_path = '/v1/agent/conversations'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'create_agent_conversation_request'])

  # return_type
  return_type = opts[:debug_return_type] || 'AgentConversation'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"AgentsApi.create_agent_conversation",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AgentsApi#create_agent_conversation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_agent_message(id, create_agent_message_request, opts = {}) ⇒ AgentMessage

Append a message to an agent conversation.

Parameters:

  • id (String)
  • create_agent_message_request (CreateAgentMessageRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



155
156
157
158
# File 'lib/spatio-sdk/api/agents_api.rb', line 155

def create_agent_message(id, create_agent_message_request, opts = {})
  data, _status_code, _headers = create_agent_message_with_http_info(id, create_agent_message_request, opts)
  data
end

#create_agent_message_with_http_info(id, create_agent_message_request, opts = {}) ⇒ Array<(AgentMessage, Integer, Hash)>

Append a message to an agent conversation.

Parameters:

  • id (String)
  • create_agent_message_request (CreateAgentMessageRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(AgentMessage, Integer, Hash)>)

    AgentMessage data, response status code and response headers



165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
# File 'lib/spatio-sdk/api/agents_api.rb', line 165

def create_agent_message_with_http_info(id, create_agent_message_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AgentsApi.create_agent_message ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling AgentsApi.create_agent_message"
  end
  # verify the required parameter 'create_agent_message_request' is set
  if @api_client.config.client_side_validation && create_agent_message_request.nil?
    fail ArgumentError, "Missing the required parameter 'create_agent_message_request' when calling AgentsApi.create_agent_message"
  end
  # resource path
  local_var_path = '/v1/agent/conversations/{id}/messages'.sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(create_agent_message_request)

  # return_type
  return_type = opts[:debug_return_type] || 'AgentMessage'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"AgentsApi.create_agent_message",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AgentsApi#create_agent_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_agent_with_http_info(create_agent_request, opts = {}) ⇒ Array<(Agent, Integer, Hash)>

Create a new agent configuration.

Parameters:

  • create_agent_request (CreateAgentRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Agent, Integer, Hash)>)

    Agent data, response status code and response headers



35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# File 'lib/spatio-sdk/api/agents_api.rb', line 35

def create_agent_with_http_info(create_agent_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AgentsApi.create_agent ...'
  end
  # verify the required parameter 'create_agent_request' is set
  if @api_client.config.client_side_validation && create_agent_request.nil?
    fail ArgumentError, "Missing the required parameter 'create_agent_request' when calling AgentsApi.create_agent"
  end
  # resource path
  local_var_path = '/v1/agents'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(create_agent_request)

  # return_type
  return_type = opts[:debug_return_type] || 'Agent'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"AgentsApi.create_agent",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AgentsApi#create_agent\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_agent(id, opts = {}) ⇒ nil

Delete an agent configuration.

Parameters:

  • id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


226
227
228
229
# File 'lib/spatio-sdk/api/agents_api.rb', line 226

def delete_agent(id, opts = {})
  delete_agent_with_http_info(id, opts)
  nil
end

#delete_agent_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete an agent configuration.

Parameters:

  • id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
# File 'lib/spatio-sdk/api/agents_api.rb', line 235

def delete_agent_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AgentsApi.delete_agent ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling AgentsApi.delete_agent"
  end
  # resource path
  local_var_path = '/v1/agents/{id}'.sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"AgentsApi.delete_agent",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AgentsApi#delete_agent\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#execute_agent_action(execute_action_request, opts = {}) ⇒ ExecuteActionResponse

Execute an action through the agent platform.

Parameters:

  • execute_action_request (ExecuteActionRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



287
288
289
290
# File 'lib/spatio-sdk/api/agents_api.rb', line 287

def execute_agent_action(execute_action_request, opts = {})
  data, _status_code, _headers = execute_agent_action_with_http_info(execute_action_request, opts)
  data
end

#execute_agent_action_with_http_info(execute_action_request, opts = {}) ⇒ Array<(ExecuteActionResponse, Integer, Hash)>

Execute an action through the agent platform.

Parameters:

  • execute_action_request (ExecuteActionRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ExecuteActionResponse, Integer, Hash)>)

    ExecuteActionResponse data, response status code and response headers



296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
# File 'lib/spatio-sdk/api/agents_api.rb', line 296

def execute_agent_action_with_http_info(execute_action_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AgentsApi.execute_agent_action ...'
  end
  # verify the required parameter 'execute_action_request' is set
  if @api_client.config.client_side_validation && execute_action_request.nil?
    fail ArgumentError, "Missing the required parameter 'execute_action_request' when calling AgentsApi.execute_agent_action"
  end
  # resource path
  local_var_path = '/v1/agent/actions/execute'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(execute_action_request)

  # return_type
  return_type = opts[:debug_return_type] || 'ExecuteActionResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"AgentsApi.execute_agent_action",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AgentsApi#execute_agent_action\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_agent(id, opts = {}) ⇒ Agent

Fetch one agent configuration.

Parameters:

  • id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



353
354
355
356
# File 'lib/spatio-sdk/api/agents_api.rb', line 353

def get_agent(id, opts = {})
  data, _status_code, _headers = get_agent_with_http_info(id, opts)
  data
end

#get_agent_conversation(id, opts = {}) ⇒ AgentConversation

Fetch one agent conversation.

Parameters:

  • id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



414
415
416
417
# File 'lib/spatio-sdk/api/agents_api.rb', line 414

def get_agent_conversation(id, opts = {})
  data, _status_code, _headers = get_agent_conversation_with_http_info(id, opts)
  data
end

#get_agent_conversation_with_http_info(id, opts = {}) ⇒ Array<(AgentConversation, Integer, Hash)>

Fetch one agent conversation.

Parameters:

  • id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(AgentConversation, Integer, Hash)>)

    AgentConversation data, response status code and response headers



423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
# File 'lib/spatio-sdk/api/agents_api.rb', line 423

def get_agent_conversation_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AgentsApi.get_agent_conversation ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling AgentsApi.get_agent_conversation"
  end
  # resource path
  local_var_path = '/v1/agent/conversations/{id}'.sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'AgentConversation'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"AgentsApi.get_agent_conversation",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AgentsApi#get_agent_conversation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_agent_session_context(opts = {}) ⇒ AgentSessionContext

Identity bundle for the SessionStart hook (user + org + workspace + connected accounts) so the agent doesn’t fish on its first turn.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



474
475
476
477
# File 'lib/spatio-sdk/api/agents_api.rb', line 474

def get_agent_session_context(opts = {})
  data, _status_code, _headers = get_agent_session_context_with_http_info(opts)
  data
end

#get_agent_session_context_with_http_info(opts = {}) ⇒ Array<(AgentSessionContext, Integer, Hash)>

Identity bundle for the SessionStart hook (user + org + workspace + connected accounts) so the agent doesn&#39;t fish on its first turn.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(AgentSessionContext, Integer, Hash)>)

    AgentSessionContext data, response status code and response headers



482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
# File 'lib/spatio-sdk/api/agents_api.rb', line 482

def get_agent_session_context_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AgentsApi.get_agent_session_context ...'
  end
  # resource path
  local_var_path = '/v1/agent/session-context'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'AgentSessionContext'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"AgentsApi.get_agent_session_context",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AgentsApi#get_agent_session_context\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_agent_with_http_info(id, opts = {}) ⇒ Array<(Agent, Integer, Hash)>

Fetch one agent configuration.

Parameters:

  • id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Agent, Integer, Hash)>)

    Agent data, response status code and response headers



362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
# File 'lib/spatio-sdk/api/agents_api.rb', line 362

def get_agent_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AgentsApi.get_agent ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling AgentsApi.get_agent"
  end
  # resource path
  local_var_path = '/v1/agents/{id}'.sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Agent'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"AgentsApi.get_agent",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AgentsApi#get_agent\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_agent_conversation_messages(id, opts = {}) ⇒ AgentMessageListResponse

List messages on an agent conversation.

Parameters:

  • id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



530
531
532
533
# File 'lib/spatio-sdk/api/agents_api.rb', line 530

def list_agent_conversation_messages(id, opts = {})
  data, _status_code, _headers = list_agent_conversation_messages_with_http_info(id, opts)
  data
end

#list_agent_conversation_messages_with_http_info(id, opts = {}) ⇒ Array<(AgentMessageListResponse, Integer, Hash)>

List messages on an agent conversation.

Parameters:

  • id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(AgentMessageListResponse, Integer, Hash)>)

    AgentMessageListResponse data, response status code and response headers



539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
# File 'lib/spatio-sdk/api/agents_api.rb', line 539

def list_agent_conversation_messages_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AgentsApi.list_agent_conversation_messages ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling AgentsApi.list_agent_conversation_messages"
  end
  # resource path
  local_var_path = '/v1/agent/conversations/{id}/messages'.sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'AgentMessageListResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"AgentsApi.list_agent_conversation_messages",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AgentsApi#list_agent_conversation_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_agent_conversations(opts = {}) ⇒ AgentConversationListResponse

List the caller’s agent-platform conversations. Distinct from ‘/v1/conversations` (renderer-driven sidebar persistence).

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



590
591
592
593
# File 'lib/spatio-sdk/api/agents_api.rb', line 590

def list_agent_conversations(opts = {})
  data, _status_code, _headers = list_agent_conversations_with_http_info(opts)
  data
end

#list_agent_conversations_with_http_info(opts = {}) ⇒ Array<(AgentConversationListResponse, Integer, Hash)>

List the caller&#39;s agent-platform conversations. Distinct from &#x60;/v1/conversations&#x60; (renderer-driven sidebar persistence).

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
# File 'lib/spatio-sdk/api/agents_api.rb', line 598

def list_agent_conversations_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AgentsApi.list_agent_conversations ...'
  end
  # resource path
  local_var_path = '/v1/agent/conversations'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'AgentConversationListResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"AgentsApi.list_agent_conversations",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AgentsApi#list_agent_conversations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_agents(opts = {}) ⇒ AgentListResponse

List the caller’s agent configurations.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



645
646
647
648
# File 'lib/spatio-sdk/api/agents_api.rb', line 645

def list_agents(opts = {})
  data, _status_code, _headers = list_agents_with_http_info(opts)
  data
end

#list_agents_with_http_info(opts = {}) ⇒ Array<(AgentListResponse, Integer, Hash)>

List the caller&#39;s agent configurations.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(AgentListResponse, Integer, Hash)>)

    AgentListResponse data, response status code and response headers



653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
# File 'lib/spatio-sdk/api/agents_api.rb', line 653

def list_agents_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AgentsApi.list_agents ...'
  end
  # resource path
  local_var_path = '/v1/agents'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'AgentListResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"AgentsApi.list_agents",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AgentsApi#list_agents\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_preconfigured_agents(opts = {}) ⇒ Array<PreconfiguredAgent>

Curated featured agents (e.g. "Claude Code", "Research Assistant"). Read-only — these are surfaced by the renderer’s preconfigured-picker UI.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



700
701
702
703
# File 'lib/spatio-sdk/api/agents_api.rb', line 700

def list_preconfigured_agents(opts = {})
  data, _status_code, _headers = list_preconfigured_agents_with_http_info(opts)
  data
end

#list_preconfigured_agents_with_http_info(opts = {}) ⇒ Array<(Array<PreconfiguredAgent>, Integer, Hash)>

Curated featured agents (e.g. &quot;Claude Code&quot;, &quot;Research Assistant&quot;). Read-only — these are surfaced by the renderer&#39;s preconfigured-picker UI.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Array<PreconfiguredAgent>, Integer, Hash)>)

    Array<PreconfiguredAgent> data, response status code and response headers



708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
# File 'lib/spatio-sdk/api/agents_api.rb', line 708

def list_preconfigured_agents_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AgentsApi.list_preconfigured_agents ...'
  end
  # resource path
  local_var_path = '/v1/agents/preconfigured'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Array<PreconfiguredAgent>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"AgentsApi.list_preconfigured_agents",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AgentsApi#list_preconfigured_agents\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_agent(id, update_agent_request, opts = {}) ⇒ Agent

Update an agent configuration.

Parameters:

  • id (String)
  • update_agent_request (UpdateAgentRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



757
758
759
760
# File 'lib/spatio-sdk/api/agents_api.rb', line 757

def update_agent(id, update_agent_request, opts = {})
  data, _status_code, _headers = update_agent_with_http_info(id, update_agent_request, opts)
  data
end

#update_agent_with_http_info(id, update_agent_request, opts = {}) ⇒ Array<(Agent, Integer, Hash)>

Update an agent configuration.

Parameters:

  • id (String)
  • update_agent_request (UpdateAgentRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Agent, Integer, Hash)>)

    Agent data, response status code and response headers



767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
# File 'lib/spatio-sdk/api/agents_api.rb', line 767

def update_agent_with_http_info(id, update_agent_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AgentsApi.update_agent ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling AgentsApi.update_agent"
  end
  # verify the required parameter 'update_agent_request' is set
  if @api_client.config.client_side_validation && update_agent_request.nil?
    fail ArgumentError, "Missing the required parameter 'update_agent_request' when calling AgentsApi.update_agent"
  end
  # resource path
  local_var_path = '/v1/agents/{id}'.sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(update_agent_request)

  # return_type
  return_type = opts[:debug_return_type] || 'Agent'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"AgentsApi.update_agent",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AgentsApi#update_agent\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end