Skip to content
Letta Platform Letta Platform Letta Docs
Sign up

List Tags

tags.list(TagListParams**kwargs) -> TagListResponse
get/v1/tags/

Get the list of all tags (from agents and blocks) that have been created.

ParametersExpand Collapse
after: Optional[str]

Tag cursor for pagination. Returns tags that come after this tag in the specified sort order

before: Optional[str]

Tag cursor for pagination. Returns tags that come before this tag in the specified sort order

limit: Optional[int]

Maximum number of tags to return

name: Optional[str]

Filter tags by name

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

Sort order for tags. 'asc' for alphabetical order, 'desc' for reverse alphabetical order

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

Field to sort by

Deprecatedquery_text: Optional[str]

Filter tags by text search. Deprecated, please use name field instead

ReturnsExpand Collapse
List[str]
List Tags
import os
from letta_client import Letta

client = Letta(
    api_key=os.environ.get("LETTA_API_KEY"),  # This is the default and can be omitted
)
tags = client.tags.list()
print(tags)
[
  "string"
]
Returns Examples
[
  "string"
]