Spatio.Api.Agents (spatio_sdk v0.0.2)
API calls for all endpoints tagged Agents.
Summary
Functions
Create a new agent configuration.
Create a new agent-platform conversation.
Append a message to an agent conversation.
Delete an agent configuration.
Execute an action through the agent platform.
Fetch one agent configuration.
Fetch one agent conversation.
Identity bundle for the SessionStart hook (user + org + workspace + connected accounts) so the agent doesn't fish on its first turn.
List messages on an agent conversation.
List the caller's agent-platform conversations. Distinct from /v1/conversations (renderer-driven sidebar persistence).
List the caller's agent configurations.
Curated featured agents (e.g. "Claude Code", "Research Assistant"). Read-only — these are surfaced by the renderer's preconfigured-picker UI.
Update an agent configuration.
Functions
@spec create_agent(Tesla.Env.client(), Spatio.Model.CreateAgentRequest.t(), keyword()) :: {:ok, Spatio.Model.ApiError.t()} | {:ok, Spatio.Model.Agent.t()} | {:error, Tesla.Env.t()}
Create a new agent configuration.
Parameters
connection(Spatio.Connection): Connection to servercreate_agent_request(CreateAgentRequest):opts(keyword): Optional parameters
Returns
{:ok, Spatio.Model.Agent.t}on success{:error, Tesla.Env.t}on failure
@spec create_agent_conversation( Tesla.Env.client(), keyword() ) :: {:ok, Spatio.Model.AgentConversation.t()} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Create a new agent-platform conversation.
Parameters
connection(Spatio.Connection): Connection to serveropts(keyword): Optional parameters:body(CreateAgentConversationRequest):
Returns
{:ok, Spatio.Model.AgentConversation.t}on success{:error, Tesla.Env.t}on failure
@spec create_agent_message( Tesla.Env.client(), String.t(), Spatio.Model.CreateAgentMessageRequest.t(), keyword() ) :: {:ok, Spatio.Model.ApiError.t()} | {:ok, Spatio.Model.AgentMessage.t()} | {:error, Tesla.Env.t()}
Append a message to an agent conversation.
Parameters
connection(Spatio.Connection): Connection to serverid(String.t):create_agent_message_request(CreateAgentMessageRequest):opts(keyword): Optional parameters
Returns
{:ok, Spatio.Model.AgentMessage.t}on success{:error, Tesla.Env.t}on failure
@spec delete_agent(Tesla.Env.client(), String.t(), keyword()) :: {:ok, nil} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Delete an agent configuration.
Parameters
connection(Spatio.Connection): Connection to serverid(String.t):opts(keyword): Optional parameters
Returns
{:ok, nil}on success{:error, Tesla.Env.t}on failure
@spec execute_agent_action( Tesla.Env.client(), Spatio.Model.ExecuteActionRequest.t(), keyword() ) :: {:ok, Spatio.Model.ExecuteActionResponse.t()} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Execute an action through the agent platform.
Parameters
connection(Spatio.Connection): Connection to serverexecute_action_request(ExecuteActionRequest):opts(keyword): Optional parameters
Returns
{:ok, Spatio.Model.ExecuteActionResponse.t}on success{:error, Tesla.Env.t}on failure
@spec get_agent(Tesla.Env.client(), String.t(), keyword()) :: {:ok, Spatio.Model.ApiError.t()} | {:ok, Spatio.Model.Agent.t()} | {:error, Tesla.Env.t()}
Fetch one agent configuration.
Parameters
connection(Spatio.Connection): Connection to serverid(String.t):opts(keyword): Optional parameters
Returns
{:ok, Spatio.Model.Agent.t}on success{:error, Tesla.Env.t}on failure
@spec get_agent_conversation(Tesla.Env.client(), String.t(), keyword()) :: {:ok, Spatio.Model.AgentConversation.t()} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Fetch one agent conversation.
Parameters
connection(Spatio.Connection): Connection to serverid(String.t):opts(keyword): Optional parameters
Returns
{:ok, Spatio.Model.AgentConversation.t}on success{:error, Tesla.Env.t}on failure
@spec get_agent_session_context( Tesla.Env.client(), keyword() ) :: {:ok, Spatio.Model.ApiError.t()} | {:ok, Spatio.Model.AgentSessionContext.t()} | {:error, Tesla.Env.t()}
Identity bundle for the SessionStart hook (user + org + workspace + connected accounts) so the agent doesn't fish on its first turn.
Parameters
connection(Spatio.Connection): Connection to serveropts(keyword): Optional parameters
Returns
{:ok, Spatio.Model.AgentSessionContext.t}on success{:error, Tesla.Env.t}on failure
@spec list_agent_conversation_messages(Tesla.Env.client(), String.t(), keyword()) :: {:ok, Spatio.Model.AgentMessageListResponse.t()} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
List messages on an agent conversation.
Parameters
connection(Spatio.Connection): Connection to serverid(String.t):opts(keyword): Optional parameters
Returns
{:ok, Spatio.Model.AgentMessageListResponse.t}on success{:error, Tesla.Env.t}on failure
@spec list_agent_conversations( Tesla.Env.client(), keyword() ) :: {:ok, Spatio.Model.AgentConversationListResponse.t()} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
List the caller's agent-platform conversations. Distinct from /v1/conversations (renderer-driven sidebar persistence).
Parameters
connection(Spatio.Connection): Connection to serveropts(keyword): Optional parameters
Returns
{:ok, Spatio.Model.AgentConversationListResponse.t}on success{:error, Tesla.Env.t}on failure
@spec list_agents( Tesla.Env.client(), keyword() ) :: {:ok, Spatio.Model.AgentListResponse.t()} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
List the caller's agent configurations.
Parameters
connection(Spatio.Connection): Connection to serveropts(keyword): Optional parameters
Returns
{:ok, Spatio.Model.AgentListResponse.t}on success{:error, Tesla.Env.t}on failure
@spec list_preconfigured_agents( Tesla.Env.client(), keyword() ) :: {:ok, [Spatio.Model.PreconfiguredAgent.t()]} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Curated featured agents (e.g. "Claude Code", "Research Assistant"). Read-only — these are surfaced by the renderer's preconfigured-picker UI.
Parameters
connection(Spatio.Connection): Connection to serveropts(keyword): Optional parameters
Returns
{:ok, [%PreconfiguredAgent{}, ...]}on success{:error, Tesla.Env.t}on failure
@spec update_agent( Tesla.Env.client(), String.t(), Spatio.Model.UpdateAgentRequest.t(), keyword() ) :: {:ok, Spatio.Model.ApiError.t()} | {:ok, Spatio.Model.Agent.t()} | {:error, Tesla.Env.t()}
Update an agent configuration.
Parameters
connection(Spatio.Connection): Connection to serverid(String.t):update_agent_request(UpdateAgentRequest):opts(keyword): Optional parameters
Returns
{:ok, Spatio.Model.Agent.t}on success{:error, Tesla.Env.t}on failure