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

Open in Claude
Open in ChatGPT

Modify Group

groups.modify(strgroup_id, GroupModifyParams**kwargs) -> Group
patch/v1/groups/{group_id}

Create a new multi-agent group with the specified configuration.

ParametersExpand Collapse
group_id: str

The ID of the group in the format 'group-'

minLength42
maxLength42
agent_ids: Optional[SequenceNotStr[str]]
description: Optional[str]
manager_config: Optional[ManagerConfig]
Accepts one of the following:
class ManagerConfigRoundRobinManagerUpdate:
manager_type: Optional[Literal["round_robin"]]
Accepts one of the following:
"round_robin"
max_turns: Optional[int]
class ManagerConfigSupervisorManagerUpdate:
manager_agent_id: Optional[str]
manager_type: Optional[Literal["supervisor"]]
Accepts one of the following:
"supervisor"
class ManagerConfigDynamicManagerUpdate:
manager_agent_id: Optional[str]
manager_type: Optional[Literal["dynamic"]]
Accepts one of the following:
"dynamic"
max_turns: Optional[int]
termination_token: Optional[str]
class ManagerConfigSleeptimeManagerUpdate:
manager_agent_id: Optional[str]
manager_type: Optional[Literal["sleeptime"]]
Accepts one of the following:
"sleeptime"
sleeptime_agent_frequency: Optional[int]
class ManagerConfigVoiceSleeptimeManagerUpdate:
manager_agent_id: Optional[str]
manager_type: Optional[Literal["voice_sleeptime"]]
Accepts one of the following:
"voice_sleeptime"
max_message_buffer_length: Optional[int]

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.

min_message_buffer_length: Optional[int]

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: Optional[str]

The associated project id.

Deprecatedshared_block_ids: Optional[SequenceNotStr[str]]
ReturnsExpand Collapse
class Group:
id: str

The id of the group. Assigned by the database.

agent_ids: List[str]
description: str
manager_type: ManagerType
Accepts one of the following:
"round_robin"
"supervisor"
"dynamic"
"sleeptime"
"voice_sleeptime"
"swarm"
base_template_id: Optional[str]

The base template id.

deployment_id: Optional[str]

The id of the deployment.

hidden: Optional[bool]

If set to True, the group will be hidden.

last_processed_message_id: Optional[str]
manager_agent_id: Optional[str]
max_message_buffer_length: Optional[int]

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: Optional[int]
min_message_buffer_length: Optional[int]

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: Optional[str]

The associated project id.

Deprecatedshared_block_ids: Optional[List[str]]
sleeptime_agent_frequency: Optional[int]
template_id: Optional[str]

The id of the template.

termination_token: Optional[str]
turns_counter: Optional[int]
Modify Group
from letta_client import Letta

client = Letta(
    api_key="My API Key",
)
group = client.groups.modify(
    group_id="group-123e4567-e89b-42d3-8456-426614174000",
)
print(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
}