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

Open in Claude
Open in ChatGPT

List Agents For Folder

folders.agents.list(strfolder_id, AgentListParams**kwargs) -> AgentListResponse
get/v1/folders/{folder_id}/agents

Get all agent IDs that have the specified folder attached.

ParametersExpand Collapse
folder_id: str

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

minLength43
maxLength43
after: Optional[str]

Agent ID cursor for pagination. Returns agents that come after this agent ID in the specified sort order

before: Optional[str]

Agent ID cursor for pagination. Returns agents that come before this agent ID in the specified sort order

limit: Optional[int]

Maximum number of agents to return

order: Optional[Literal["asc", "desc"]]

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

Accepts one of the following:
"asc"
"desc"
order_by: Optional[Literal["created_at"]]

Field to sort by

Accepts one of the following:
"created_at"
ReturnsExpand Collapse
AgentListResponse = List[str]
List Agents For Folder
from letta_client import Letta

client = Letta(
    api_key="My API Key",
)
agents = client.folders.agents.list(
    folder_id="source-123e4567-e89b-42d3-8456-426614174000",
)
print(agents)
[
  "string"
]
Returns Examples
[
  "string"
]