Skip to content
  • Auto
  • Light
  • Dark
DiscordForumGitHubSign up
View as Markdown
Copy Markdown

Open in Claude
Open in ChatGPT

List Groups

client.groups.list(GroupListParams { after, before, limit, 4 more } query?, RequestOptionsoptions?): ArrayPage<Group { id, agent_ids, description, 15 more } >
get/v1/groups/

Fetch all multi-agent groups matching query.

ParametersExpand Collapse
query: GroupListParams { after, before, limit, 4 more }
after?: string | null

Group ID cursor for pagination. Returns groups that come after this group ID in the specified sort order

before?: string | null

Group ID cursor for pagination. Returns groups that come before this group ID in the specified sort order

limit?: number | null

Maximum number of groups to return

manager_type?: ManagerType | null

Search groups by manager type

Accepts one of the following:
"round_robin"
"supervisor"
"dynamic"
"sleeptime"
"voice_sleeptime"
"swarm"
order?: "asc" | "desc"

Sort order for groups by creation time. 'asc' for oldest first, 'desc' for newest first

Accepts one of the following:
"asc"
"desc"
order_by?: "created_at"

Field to sort by

Accepts one of the following:
"created_at"
project_id?: string | null

Search groups by project id

ReturnsExpand Collapse
Group { id, agent_ids, description, 15 more }
id: string

The id of the group. Assigned by the database.

agent_ids: Array<string>
description: string
manager_type: ManagerType
Accepts one of the following:
"round_robin"
"supervisor"
"dynamic"
"sleeptime"
"voice_sleeptime"
"swarm"
base_template_id?: string | null

The base template id.

deployment_id?: string | null

The id of the deployment.

hidden?: boolean | null

If set to True, the group will be hidden.

last_processed_message_id?: string | null
manager_agent_id?: string | null
max_message_buffer_length?: number | null

The desired maximum length of messages in the context window of the convo agent. This is a best effort, and may be off slightly due to user/assistant interleaving.

max_turns?: number | null
min_message_buffer_length?: number | null

The desired minimum length of messages in the context window of the convo agent. This is a best effort, and may be off-by-one due to user/assistant interleaving.

project_id?: string | null

The associated project id.

Deprecatedshared_block_ids?: Array<string>
sleeptime_agent_frequency?: number | null
template_id?: string | null

The id of the template.

termination_token?: string | null
turns_counter?: number | null
List Groups
import Letta from '@letta-ai/letta-client';

const client = new Letta({
  apiKey: 'My API Key',
});

// Automatically fetches more pages as needed.
for await (const group of client.groups.list()) {
  console.log(group.id);
}
[
  {
    "id": "id",
    "agent_ids": [
      "string"
    ],
    "description": "description",
    "manager_type": "round_robin",
    "base_template_id": "base_template_id",
    "deployment_id": "deployment_id",
    "hidden": true,
    "last_processed_message_id": "last_processed_message_id",
    "manager_agent_id": "manager_agent_id",
    "max_message_buffer_length": 0,
    "max_turns": 0,
    "min_message_buffer_length": 0,
    "project_id": "project_id",
    "shared_block_ids": [
      "string"
    ],
    "sleeptime_agent_frequency": 0,
    "template_id": "template_id",
    "termination_token": "termination_token",
    "turns_counter": 0
  }
]
Returns Examples
[
  {
    "id": "id",
    "agent_ids": [
      "string"
    ],
    "description": "description",
    "manager_type": "round_robin",
    "base_template_id": "base_template_id",
    "deployment_id": "deployment_id",
    "hidden": true,
    "last_processed_message_id": "last_processed_message_id",
    "manager_agent_id": "manager_agent_id",
    "max_message_buffer_length": 0,
    "max_turns": 0,
    "min_message_buffer_length": 0,
    "project_id": "project_id",
    "shared_block_ids": [
      "string"
    ],
    "sleeptime_agent_frequency": 0,
    "template_id": "template_id",
    "termination_token": "termination_token",
    "turns_counter": 0
  }
]