LettaAPI.Api.Groups (letta_api v1.0.0)
API calls for all endpoints tagged Groups
.
Summary
Functions
Count Groups Get the count of all groups associated with a given user.
Create Group Create a new multi-agent group with the specified configuration.
Delete Group Delete a multi-agent group.
List Group Messages Retrieve message history for an agent.
List Groups Fetch all multi-agent groups matching query.
Modify Group Create a new multi-agent group with the specified configuration.
Modify Group Message Update the details of a message associated with an agent.
Reset Group Messages Delete the group messages for all agents that are part of the multi-agent group.
Retrieve Group Retrieve the group by id.
Send Group Message Process a user message and return the group's response. This endpoint accepts a message from a user and processes it through through agents in the group based on the specified pattern
Send Group Message Streaming Process a user message and return the group's responses. This endpoint accepts a message from a user and processes it through agents in the group based on the specified pattern. It will stream the steps of the response always, and stream the tokens if 'stream_tokens' is set to True.
Functions
@spec count_groups( Tesla.Env.client(), keyword() ) :: {:ok, integer()} | {:ok, LettaAPI.Model.HttpValidationError.t()} | {:error, Tesla.Env.t()}
Count Groups Get the count of all groups associated with a given user.
Parameters
connection
(LettaAPI.Connection): Connection to serveropts
(keyword): Optional parameters:user_id
(String.t):
Returns
{:ok, integer()}
on success{:error, Tesla.Env.t}
on failure
@spec create_group(Tesla.Env.client(), LettaAPI.Model.GroupCreate.t(), keyword()) :: {:ok, LettaAPI.Model.HttpValidationError.t()} | {:ok, LettaAPI.Model.Group.t()} | {:error, Tesla.Env.t()}
Create Group Create a new multi-agent group with the specified configuration.
Parameters
connection
(LettaAPI.Connection): Connection to servergroup_create
(GroupCreate):opts
(keyword): Optional parameters:user_id
(String.t)::"X-Project"
(String.t):
Returns
{:ok, LettaAPI.Model.Group.t}
on success{:error, Tesla.Env.t}
on failure
@spec delete_group(Tesla.Env.client(), String.t(), keyword()) :: {:ok, any()} | {:ok, LettaAPI.Model.HttpValidationError.t()} | {:error, Tesla.Env.t()}
Delete Group Delete a multi-agent group.
Parameters
connection
(LettaAPI.Connection): Connection to servergroup_id
(String.t):opts
(keyword): Optional parameters:user_id
(String.t):
Returns
{:ok, any()}
on success{:error, Tesla.Env.t}
on failure
@spec list_group_messages(Tesla.Env.client(), String.t(), keyword()) :: {:ok, LettaAPI.Model.HttpValidationError.t()} | {:ok, [LettaAPI.Model.LettaMessageUnion.t()]} | {:error, Tesla.Env.t()}
List Group Messages Retrieve message history for an agent.
Parameters
connection
(LettaAPI.Connection): Connection to servergroup_id
(String.t):opts
(keyword): Optional parameters:after
(String.t): Message after which to retrieve the returned messages.:before
(String.t): Message before which to retrieve the returned messages.:limit
(integer()): Maximum number of messages to retrieve.:use_assistant_message
(boolean()): Whether to use assistant messages:assistant_message_tool_name
(String.t): The name of the designated message tool.:assistant_message_tool_kwarg
(String.t): The name of the message argument.:user_id
(String.t):
Returns
{:ok, [%LettaMessageUnion{}, ...]}
on success{:error, Tesla.Env.t}
on failure
@spec list_groups( Tesla.Env.client(), keyword() ) :: {:ok, [LettaAPI.Model.Group.t()]} | {:ok, LettaAPI.Model.HttpValidationError.t()} | {:error, Tesla.Env.t()}
List Groups Fetch all multi-agent groups matching query.
Parameters
connection
(LettaAPI.Connection): Connection to serveropts
(keyword): Optional parameters:manager_type
(ManagerType): Search groups by manager type:before
(String.t): Cursor for pagination:after
(String.t): Cursor for pagination:limit
(integer()): Limit for pagination:project_id
(String.t): Search groups by project id:user_id
(String.t):
Returns
{:ok, [%Group{}, ...]}
on success{:error, Tesla.Env.t}
on failure
@spec modify_group( Tesla.Env.client(), String.t(), LettaAPI.Model.GroupUpdate.t(), keyword() ) :: {:ok, LettaAPI.Model.HttpValidationError.t()} | {:ok, LettaAPI.Model.Group.t()} | {:error, Tesla.Env.t()}
Modify Group Create a new multi-agent group with the specified configuration.
Parameters
connection
(LettaAPI.Connection): Connection to servergroup_id
(String.t):group_update
(GroupUpdate):opts
(keyword): Optional parameters:user_id
(String.t)::"X-Project"
(String.t):
Returns
{:ok, LettaAPI.Model.Group.t}
on success{:error, Tesla.Env.t}
on failure
@spec modify_group_message( Tesla.Env.client(), String.t(), String.t(), LettaAPI.Model.Request1.t(), keyword() ) :: {:ok, LettaAPI.Model.ResponseModifyGroupMessage.t()} | {:ok, LettaAPI.Model.HttpValidationError.t()} | {:error, Tesla.Env.t()}
Modify Group Message Update the details of a message associated with an agent.
Parameters
connection
(LettaAPI.Connection): Connection to servergroup_id
(String.t):message_id
(String.t):request1
(Request1):opts
(keyword): Optional parameters:user_id
(String.t):
Returns
{:ok, LettaAPI.Model.ResponseModifyGroupMessage.t}
on success{:error, Tesla.Env.t}
on failure
@spec reset_group_messages(Tesla.Env.client(), String.t(), keyword()) :: {:ok, any()} | {:ok, LettaAPI.Model.HttpValidationError.t()} | {:error, Tesla.Env.t()}
Reset Group Messages Delete the group messages for all agents that are part of the multi-agent group.
Parameters
connection
(LettaAPI.Connection): Connection to servergroup_id
(String.t):opts
(keyword): Optional parameters:user_id
(String.t):
Returns
{:ok, any()}
on success{:error, Tesla.Env.t}
on failure
@spec retrieve_group(Tesla.Env.client(), String.t(), keyword()) :: {:ok, LettaAPI.Model.HttpValidationError.t()} | {:ok, LettaAPI.Model.Group.t()} | {:error, Tesla.Env.t()}
Retrieve Group Retrieve the group by id.
Parameters
connection
(LettaAPI.Connection): Connection to servergroup_id
(String.t):opts
(keyword): Optional parameters:user_id
(String.t):
Returns
{:ok, LettaAPI.Model.Group.t}
on success{:error, Tesla.Env.t}
on failure
@spec send_group_message( Tesla.Env.client(), String.t(), LettaAPI.Model.LettaRequest.t(), keyword() ) :: {:ok, LettaAPI.Model.LettaResponse.t()} | {:ok, LettaAPI.Model.HttpValidationError.t()} | {:error, Tesla.Env.t()}
Send Group Message Process a user message and return the group's response. This endpoint accepts a message from a user and processes it through through agents in the group based on the specified pattern
Parameters
connection
(LettaAPI.Connection): Connection to servergroup_id
(String.t):letta_request
(LettaRequest):opts
(keyword): Optional parameters:user_id
(String.t):
Returns
{:ok, LettaAPI.Model.LettaResponse.t}
on success{:error, Tesla.Env.t}
on failure
@spec send_group_message_streaming( Tesla.Env.client(), String.t(), LettaAPI.Model.LettaStreamingRequest.t(), keyword() ) :: {:ok, any()} | {:ok, LettaAPI.Model.HttpValidationError.t()} | {:error, Tesla.Env.t()}
Send Group Message Streaming Process a user message and return the group's responses. This endpoint accepts a message from a user and processes it through agents in the group based on the specified pattern. It will stream the steps of the response always, and stream the tokens if 'stream_tokens' is set to True.
Parameters
connection
(LettaAPI.Connection): Connection to servergroup_id
(String.t):letta_streaming_request
(LettaStreamingRequest):opts
(keyword): Optional parameters:user_id
(String.t):
Returns
{:ok, any()}
on success{:error, Tesla.Env.t}
on failure