client.tools.retrieve(...)
-
-
-
Get a tool by ID
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.tools.retrieve( tool_id="tool_id", )
-
-
-
tool_id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tools.delete(...)
-
-
-
Delete a tool by name
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.tools.delete( tool_id="tool_id", )
-
-
-
tool_id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tools.modify(...)
-
-
-
Update an existing tool
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.tools.modify( tool_id="tool_id", )
-
-
-
tool_id:
str
-
description:
typing.Optional[str]— The description of the tool.
-
tags:
typing.Optional[typing.Sequence[str]]— Metadata tags.
-
source_code:
typing.Optional[str]— The source code of the function.
-
source_type:
typing.Optional[str]— The type of the source code.
-
json_schema:
typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]— The JSON schema of the function (auto-generated from source_code if not provided)
-
args_json_schema:
typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]— The args JSON schema of the function.
-
return_char_limit:
typing.Optional[int]— The maximum number of characters in the response.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tools.list(...)
-
-
-
Get a list of all tools available to agents belonging to the org of the user
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.tools.list()
-
-
-
after:
typing.Optional[str]
-
limit:
typing.Optional[int]
-
name:
typing.Optional[str]
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tools.create(...)
-
-
-
Create a new tool
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.tools.create( source_code="source_code", )
-
-
-
source_code:
str— The source code of the function.
-
description:
typing.Optional[str]— The description of the tool.
-
tags:
typing.Optional[typing.Sequence[str]]— Metadata tags.
-
source_type:
typing.Optional[str]— The source type of the function.
-
json_schema:
typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]— The JSON schema of the function (auto-generated from source_code if not provided)
-
args_json_schema:
typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]— The args JSON schema of the function.
-
return_char_limit:
typing.Optional[int]— The maximum number of characters in the response.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tools.upsert(...)
-
-
-
Create or update a tool
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.tools.upsert( source_code="source_code", )
-
-
-
source_code:
str— The source code of the function.
-
description:
typing.Optional[str]— The description of the tool.
-
tags:
typing.Optional[typing.Sequence[str]]— Metadata tags.
-
source_type:
typing.Optional[str]— The source type of the function.
-
json_schema:
typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]— The JSON schema of the function (auto-generated from source_code if not provided)
-
args_json_schema:
typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]— The args JSON schema of the function.
-
return_char_limit:
typing.Optional[int]— The maximum number of characters in the response.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tools.add_base_tool()
-
-
-
Upsert base tools
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.tools.add_base_tool()
-
-
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tools.run_tool_from_source(...)
-
-
-
Attempt to build a tool from source, then run it on the provided arguments
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.tools.run_tool_from_source( source_code="source_code", args={"key": "value"}, )
-
-
-
source_code:
str— The source code of the function.
-
args:
typing.Dict[str, typing.Optional[typing.Any]]— The arguments to pass to the tool.
-
env_vars:
typing.Optional[typing.Dict[str, str]]— The environment variables to pass to the tool.
-
name:
typing.Optional[str]— The name of the tool to run.
-
source_type:
typing.Optional[str]— The type of the source code.
-
args_json_schema:
typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]— The args JSON schema of the function.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tools.list_composio_apps()
-
-
-
Get a list of all Composio apps
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.tools.list_composio_apps()
-
-
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tools.list_composio_actions_by_app(...)
-
-
-
Get a list of all Composio actions for a specific app
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.tools.list_composio_actions_by_app( composio_app_name="composio_app_name", )
-
-
-
composio_app_name:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tools.add_composio_tool(...)
-
-
-
Add a new Composio tool by action name (Composio refers to each tool as an
Action)
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.tools.add_composio_tool( composio_action_name="composio_action_name", )
-
-
-
composio_action_name:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.sources.retrieve(...)
-
-
-
Get all sources
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.sources.retrieve( source_id="source_id", )
-
-
-
source_id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.sources.delete(...)
-
-
-
Delete a data source.
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.sources.delete( source_id="source_id", )
-
-
-
source_id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.sources.modify(...)
-
-
-
Update the name or documentation of an existing data source.
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.sources.modify( source_id="source_id", )
-
-
-
source_id:
str
-
name:
typing.Optional[str]— The name of the source.
-
description:
typing.Optional[str]— The description of the source.
-
metadata:
typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]— Metadata associated with the source.
-
embedding_config:
typing.Optional[EmbeddingConfig]— The embedding configuration used by the source.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.sources.get_by_name(...)
-
-
-
Get a source by name
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.sources.get_by_name( source_name="source_name", )
-
-
-
source_name:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.sources.list()
-
-
-
List all data sources created by a user.
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.sources.list()
-
-
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.sources.create(...)
-
-
-
Create a new data source.
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.sources.create( name="name", )
-
-
-
name:
str— The name of the source.
-
embedding_config:
typing.Optional[EmbeddingConfig]— The embedding configuration used by the source.
-
description:
typing.Optional[str]— The description of the source.
-
metadata:
typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]— Metadata associated with the source.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.agents.list(...)
-
-
-
List all agents associated with a given user. This endpoint retrieves a list of all agents and their configurations associated with the specified user ID.
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.agents.list()
-
-
-
name:
typing.Optional[str]— Name of the agent
-
tags:
typing.Optional[typing.Union[str, typing.Sequence[str]]]— List of tags to filter agents by
-
match_all_tags:
typing.Optional[bool]— If True, only returns agents that match ALL given tags. Otherwise, return agents that have ANY of the passed in tags.
-
before:
typing.Optional[str]— Cursor for pagination
-
after:
typing.Optional[str]— Cursor for pagination
-
limit:
typing.Optional[int]— Limit for pagination
-
query_text:
typing.Optional[str]— Search agents by name
-
project_id:
typing.Optional[str]— Search agents by project id
-
template_id:
typing.Optional[str]— Search agents by template id
-
base_template_id:
typing.Optional[str]— Search agents by base template id
-
identifier_id:
typing.Optional[str]— Search agents by identifier id
-
identifier_keys:
typing.Optional[typing.Union[str, typing.Sequence[str]]]— Search agents by identifier keys
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.agents.create(...)
-
-
-
Create a new agent with the specified configuration.
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.agents.create()
-
-
-
project:
typing.Optional[str]
-
name:
typing.Optional[str]— The name of the agent.
-
memory_blocks:
typing.Optional[typing.Sequence[CreateBlock]]— The blocks to create in the agent's in-context memory.
-
tools:
typing.Optional[typing.Sequence[str]]— The tools used by the agent.
-
tool_ids:
typing.Optional[typing.Sequence[str]]— The ids of the tools used by the agent.
-
source_ids:
typing.Optional[typing.Sequence[str]]— The ids of the sources used by the agent.
-
block_ids:
typing.Optional[typing.Sequence[str]]— The ids of the blocks used by the agent.
-
tool_rules:
typing.Optional[typing.Sequence[CreateAgentRequestToolRulesItem]]— The tool rules governing the agent.
-
tags:
typing.Optional[typing.Sequence[str]]— The tags associated with the agent.
-
system:
typing.Optional[str]— The system prompt used by the agent.
-
agent_type:
typing.Optional[AgentType]— The type of agent.
-
llm_config:
typing.Optional[LlmConfig]— The LLM configuration used by the agent.
-
embedding_config:
typing.Optional[EmbeddingConfig]— The embedding configuration used by the agent.
-
initial_message_sequence:
typing.Optional[typing.Sequence[MessageCreate]]— The initial set of messages to put in the agent's in-context memory.
-
include_base_tools:
typing.Optional[bool]— If true, attaches the Letta core tools (e.g. archival_memory and core_memory related functions).
-
include_multi_agent_tools:
typing.Optional[bool]— If true, attaches the Letta multi-agent tools (e.g. sending a message to another agent).
-
include_base_tool_rules:
typing.Optional[bool]— If true, attaches the Letta base tool rules (e.g. deny all tools not explicitly allowed).
-
description:
typing.Optional[str]— The description of the agent.
-
metadata:
typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]— The metadata of the agent.
-
model:
typing.Optional[str]— The LLM configuration handle used by the agent, specified in the format provider/model-name, as an alternative to specifying llm_config.
-
embedding:
typing.Optional[str]— The embedding configuration handle used by the agent, specified in the format provider/model-name.
-
context_window_limit:
typing.Optional[int]— The context window limit used by the agent.
-
embedding_chunk_size:
typing.Optional[int]— The embedding chunk size used by the agent.
-
from_template:
typing.Optional[str]— The template id used to configure the agent
-
template:
typing.Optional[bool]— Whether the agent is a template
-
create_agent_request_project:
typing.Optional[str]— Deprecated: Project should now be passed via the X-Project header instead of in the request body. If using the sdk, this can be done via the new x_project field below.
-
tool_exec_environment_variables:
typing.Optional[typing.Dict[str, typing.Optional[str]]]— The environment variables for tool execution specific to this agent.
-
memory_variables:
typing.Optional[typing.Dict[str, typing.Optional[str]]]— The variables that should be set for the agent.
-
project_id:
typing.Optional[str]— The id of the project the agent belongs to.
-
template_id:
typing.Optional[str]— The id of the template the agent belongs to.
-
base_template_id:
typing.Optional[str]— The base template id of the agent.
-
identity_ids:
typing.Optional[typing.Sequence[str]]— The ids of the identities associated with this agent.
-
message_buffer_autoclear:
typing.Optional[bool]— If set to True, the agent will not remember previous messages (though the agent will still retain state via core memory blocks and archival/recall memory). Not recommended unless you have an advanced use case.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.agents.retrieve(...)
-
-
-
Get the state of the agent.
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.agents.retrieve( agent_id="agent_id", )
-
-
-
agent_id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.agents.delete(...)
-
-
-
Delete an agent.
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.agents.delete( agent_id="agent_id", )
-
-
-
agent_id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.agents.modify(...)
-
-
-
Update an existing agent
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.agents.modify( agent_id="agent_id", )
-
-
-
agent_id:
str
-
name:
typing.Optional[str]— The name of the agent.
-
tool_ids:
typing.Optional[typing.Sequence[str]]— The ids of the tools used by the agent.
-
source_ids:
typing.Optional[typing.Sequence[str]]— The ids of the sources used by the agent.
-
block_ids:
typing.Optional[typing.Sequence[str]]— The ids of the blocks used by the agent.
-
tags:
typing.Optional[typing.Sequence[str]]— The tags associated with the agent.
-
system:
typing.Optional[str]— The system prompt used by the agent.
-
tool_rules:
typing.Optional[typing.Sequence[UpdateAgentToolRulesItem]]— The tool rules governing the agent.
-
llm_config:
typing.Optional[LlmConfig]— The LLM configuration used by the agent.
-
embedding_config:
typing.Optional[EmbeddingConfig]— The embedding configuration used by the agent.
-
message_ids:
typing.Optional[typing.Sequence[str]]— The ids of the messages in the agent's in-context memory.
-
description:
typing.Optional[str]— The description of the agent.
-
metadata:
typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]— The metadata of the agent.
-
tool_exec_environment_variables:
typing.Optional[typing.Dict[str, typing.Optional[str]]]— The environment variables for tool execution specific to this agent.
-
project_id:
typing.Optional[str]— The id of the project the agent belongs to.
-
template_id:
typing.Optional[str]— The id of the template the agent belongs to.
-
base_template_id:
typing.Optional[str]— The base template id of the agent.
-
identity_ids:
typing.Optional[typing.Sequence[str]]— The ids of the identities associated with this agent.
-
message_buffer_autoclear:
typing.Optional[bool]— If set to True, the agent will not remember previous messages (though the agent will still retain state via core memory blocks and archival/recall memory). Not recommended unless you have an advanced use case.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.agents.modify_passage(...)
-
-
-
Modify a memory in the agent's archival memory store.
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.agents.modify_passage( agent_id="agent_id", memory_id="memory_id", id="id", )
-
-
-
agent_id:
str
-
memory_id:
str
-
id:
str— The unique identifier of the passage.
-
created_by_id:
typing.Optional[str]— The id of the user that made this object.
-
last_updated_by_id:
typing.Optional[str]— The id of the user that made this object.
-
created_at:
typing.Optional[dt.datetime]— The timestamp when the object was created.
-
updated_at:
typing.Optional[dt.datetime]— The timestamp when the object was last updated.
-
is_deleted:
typing.Optional[bool]— Whether this passage is deleted or not.
-
passage_update_agent_id:
typing.Optional[str]— The unique identifier of the agent associated with the passage.
-
source_id:
typing.Optional[str]— The data source of the passage.
-
file_id:
typing.Optional[str]— The unique identifier of the file associated with the passage.
-
metadata:
typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]— The metadata of the passage.
-
text:
typing.Optional[str]— The text of the passage.
-
embedding:
typing.Optional[typing.Sequence[float]]— The embedding of the passage.
-
embedding_config:
typing.Optional[EmbeddingConfig]— The embedding configuration used by the passage.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.agents.reset_messages(...)
-
-
-
Resets the messages for an agent
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.agents.reset_messages( agent_id="agent_id", )
-
-
-
agent_id:
str
-
add_default_initial_messages:
typing.Optional[bool]— If true, adds the default initial messages after resetting.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.agents.search(...)
-
-
-
This endpoint is only available on Letta Cloud.
Search deployed agents.
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.agents.search()
-
-
-
search:
typing.Optional[typing.Sequence[AgentsSearchRequestSearchItem]]
-
project_id:
typing.Optional[str]
-
combinator:
typing.Optional[typing.Literal["AND"]]
-
limit:
typing.Optional[float]
-
after:
typing.Optional[str]
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.identities.list(...)
-
-
-
Get a list of all identities in the database
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.identities.list()
-
-
-
name:
typing.Optional[str]
-
project_id:
typing.Optional[str]
-
identifier_key:
typing.Optional[str]
-
identity_type:
typing.Optional[IdentityType]
-
before:
typing.Optional[str]
-
after:
typing.Optional[str]
-
limit:
typing.Optional[int]
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.identities.create(...)
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.identities.create( identifier_key="identifier_key", name="name", identity_type="org", )
-
-
-
identifier_key:
str— External, user-generated identifier key of the identity.
-
name:
str— The name of the identity.
-
identity_type:
IdentityType— The type of the identity.
-
project:
typing.Optional[str]
-
project_id:
typing.Optional[str]— The project id of the identity, if applicable.
-
agent_ids:
typing.Optional[typing.Sequence[str]]— The agent ids that are associated with the identity.
-
properties:
typing.Optional[typing.Sequence[IdentityProperty]]— List of properties associated with the identity.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.identities.upsert(...)
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.identities.upsert( identifier_key="identifier_key", name="name", identity_type="org", )
-
-
-
identifier_key:
str— External, user-generated identifier key of the identity.
-
name:
str— The name of the identity.
-
identity_type:
IdentityType— The type of the identity.
-
project:
typing.Optional[str]
-
project_id:
typing.Optional[str]— The project id of the identity, if applicable.
-
agent_ids:
typing.Optional[typing.Sequence[str]]— The agent ids that are associated with the identity.
-
properties:
typing.Optional[typing.Sequence[IdentityProperty]]— List of properties associated with the identity.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.identities.retrieve(...)
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.identities.retrieve( identity_id="identity_id", )
-
-
-
identity_id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.identities.delete(...)
-
-
-
Delete an identity by its identifier key
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.identities.delete( identity_id="identity_id", )
-
-
-
identity_id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.identities.modify(...)
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.identities.modify( identity_id="identity_id", )
-
-
-
identity_id:
str
-
identifier_key:
typing.Optional[str]— External, user-generated identifier key of the identity.
-
name:
typing.Optional[str]— The name of the identity.
-
identity_type:
typing.Optional[IdentityType]— The type of the identity.
-
agent_ids:
typing.Optional[typing.Sequence[str]]— The agent ids that are associated with the identity.
-
properties:
typing.Optional[typing.Sequence[IdentityProperty]]— List of properties associated with the identity.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.models.list_llms()
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.models.list_llms()
-
-
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.models.list_embedding_models()
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.models.list_embedding_models()
-
-
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.blocks.list(...)
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.blocks.list()
-
-
-
label:
typing.Optional[str]— Labels to include (e.g. human, persona)
-
templates_only:
typing.Optional[bool]— Whether to include only templates
-
name:
typing.Optional[str]— Name of the block
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.blocks.create(...)
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.blocks.create( value="value", label="label", )
-
-
-
value:
str— Value of the block.
-
label:
str— Label of the block.
-
limit:
typing.Optional[int]— Character limit of the block.
-
name:
typing.Optional[str]— Name of the block if it is a template.
-
is_template:
typing.Optional[bool]
-
description:
typing.Optional[str]— Description of the block.
-
metadata:
typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]— Metadata of the block.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.blocks.retrieve(...)
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.blocks.retrieve( block_id="block_id", )
-
-
-
block_id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.blocks.delete(...)
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.blocks.delete( block_id="block_id", )
-
-
-
block_id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.blocks.modify(...)
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.blocks.modify( block_id="block_id", )
-
-
-
block_id:
str
-
value:
typing.Optional[str]— Value of the block.
-
limit:
typing.Optional[int]— Character limit of the block.
-
name:
typing.Optional[str]— Name of the block if it is a template.
-
is_template:
typing.Optional[bool]— Whether the block is a template (e.g. saved human/persona options).
-
label:
typing.Optional[str]— Label of the block (e.g. 'human', 'persona') in the context window.
-
description:
typing.Optional[str]— Description of the block.
-
metadata:
typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]— Metadata of the block.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.blocks.list_agents_for_block(...)
-
-
-
Retrieves all agents associated with the specified block. Raises a 404 if the block does not exist.
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.blocks.list_agents_for_block( block_id="block_id", )
-
-
-
block_id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.jobs.list(...)
-
-
-
List all jobs.
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.jobs.list()
-
-
-
source_id:
typing.Optional[str]— Only list jobs associated with the source.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.jobs.list_active()
-
-
-
List all active jobs.
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.jobs.list_active()
-
-
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.jobs.retrieve(...)
-
-
-
Get the status of a job.
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.jobs.retrieve( job_id="job_id", )
-
-
-
job_id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.jobs.delete(...)
-
-
-
Delete a job by its job_id.
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.jobs.delete( job_id="job_id", )
-
-
-
job_id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.health.check()
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.health.check()
-
-
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.providers.list_providers(...)
-
-
-
Get a list of all custom providers in the database
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.providers.list_providers()
-
-
-
after:
typing.Optional[str]
-
limit:
typing.Optional[int]
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.providers.create_provider(...)
-
-
-
Create a new custom provider
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.providers.create_provider( name="name", api_key="api_key", )
-
-
-
name:
str— The name of the provider.
-
api_key:
str— API key used for requests to the provider.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.providers.delete_provider(...)
-
-
-
Delete an existing custom provider
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.providers.delete_provider( provider_id="provider_id", )
-
-
-
provider_id:
str— The provider_id key to be deleted.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.providers.modify_provider(...)
-
-
-
Update an existing custom provider
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.providers.modify_provider( id="id", api_key="api_key", )
-
-
-
id:
str— The id of the provider to update.
-
api_key:
str— API key used for requests to the provider.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.runs.list_runs()
-
-
-
List all runs.
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.runs.list_runs()
-
-
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.runs.list_active_runs()
-
-
-
List all active runs.
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.runs.list_active_runs()
-
-
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.runs.retrieve_run(...)
-
-
-
Get the status of a run.
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.runs.retrieve_run( run_id="run_id", )
-
-
-
run_id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.runs.delete_run(...)
-
-
-
Delete a run by its run_id.
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.runs.delete_run( run_id="run_id", )
-
-
-
run_id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.runs.list_run_messages(...)
-
-
-
Get messages associated with a run with filtering options.
Args: run_id: ID of the run before: A cursor for use in pagination.
beforeis an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. after: A cursor for use in pagination.afteris an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. limit: Maximum number of messages to return order: Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. role: Filter by role (user/assistant/system/tool) return_message_object: Whether to return Message objects or LettaMessage objects user_id: ID of the user making the requestReturns: A list of messages associated with the run. Default is List[LettaMessage].
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.runs.list_run_messages( run_id="run_id", )
-
-
-
run_id:
str
-
before:
typing.Optional[str]— Cursor for pagination
-
after:
typing.Optional[str]— Cursor for pagination
-
limit:
typing.Optional[int]— Maximum number of messages to return
-
order:
typing.Optional[str]— Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order.
-
role:
typing.Optional[MessageRole]— Filter by role
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.runs.retrieve_run_usage(...)
-
-
-
Get usage statistics for a run.
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.runs.retrieve_run_usage( run_id="run_id", )
-
-
-
run_id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.runs.list_run_steps(...)
-
-
-
Get messages associated with a run with filtering options.
Args: run_id: ID of the run before: A cursor for use in pagination.
beforeis an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. after: A cursor for use in pagination.afteris an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. limit: Maximum number of steps to return order: Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order.Returns: A list of steps associated with the run.
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.runs.list_run_steps( run_id="run_id", )
-
-
-
run_id:
str
-
before:
typing.Optional[str]— Cursor for pagination
-
after:
typing.Optional[str]— Cursor for pagination
-
limit:
typing.Optional[int]— Maximum number of messages to return
-
order:
typing.Optional[str]— Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.steps.list_steps(...)
-
-
-
List steps with optional pagination and date filters. Dates should be provided in ISO 8601 format (e.g. 2025-01-29T15:01:19-08:00)
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.steps.list_steps()
-
-
-
before:
typing.Optional[str]— Return steps before this step ID
-
after:
typing.Optional[str]— Return steps after this step ID
-
limit:
typing.Optional[int]— Maximum number of steps to return
-
order:
typing.Optional[str]— Sort order (asc or desc)
-
start_date:
typing.Optional[str]— Return steps after this ISO datetime (e.g. "2025-01-29T15:01:19-08:00")
-
end_date:
typing.Optional[str]— Return steps before this ISO datetime (e.g. "2025-01-29T15:01:19-08:00")
-
model:
typing.Optional[str]— Filter by the name of the model used for the step
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.steps.retrieve_step(...)
-
-
-
Get a step by ID.
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.steps.retrieve_step( step_id="step_id", )
-
-
-
step_id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tag.list_tags(...)
-
-
-
Get a list of all tags in the database
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.tag.list_tags()
-
-
-
after:
typing.Optional[str]
-
limit:
typing.Optional[int]
-
query_text:
typing.Optional[str]
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.voice.create_voice_chat_completions(...)
-
-
-
from letta_client import ( ChatCompletionDeveloperMessageParam, CompletionCreateParamsNonStreaming, Letta, ) client = Letta( token="YOUR_TOKEN", ) client.voice.create_voice_chat_completions( request=CompletionCreateParamsNonStreaming( messages=[ ChatCompletionDeveloperMessageParam( content="content", ) ], model="model", ), )
-
-
-
request:
CreateVoiceChatCompletionsRequest
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.templates.create_agents(...)
-
-
-
Creates an Agent or multiple Agents from a template
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.templates.create_agents( project="project", template_version="template_version", )
-
-
-
project:
str— The project slug
-
template_version:
str— The template version, formatted as {template-name}:{version-number} or {template-name}:latest
-
tags:
typing.Optional[typing.Sequence[str]]— The tags to assign to the agent
-
agent_name:
typing.Optional[str]— The name of the agent, optional otherwise a random one will be assigned
-
memory_variables:
typing.Optional[typing.Dict[str, str]]— The memory variables to assign to the agent
-
tool_variables:
typing.Optional[typing.Dict[str, str]]— The tool variables to assign to the agent
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.agents.context.retrieve(...)
-
-
-
Retrieve the context window of a specific agent.
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.agents.context.retrieve( agent_id="agent_id", )
-
-
-
agent_id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.agents.tools.list(...)
-
-
-
Get tools from an existing agent
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.agents.tools.list( agent_id="agent_id", )
-
-
-
agent_id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.agents.tools.attach(...)
-
-
-
Attach a tool to an agent.
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.agents.tools.attach( agent_id="agent_id", tool_id="tool_id", )
-
-
-
agent_id:
str
-
tool_id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.agents.tools.detach(...)
-
-
-
Detach a tool from an agent.
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.agents.tools.detach( agent_id="agent_id", tool_id="tool_id", )
-
-
-
agent_id:
str
-
tool_id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.agents.sources.attach(...)
-
-
-
Attach a source to an agent.
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.agents.sources.attach( agent_id="agent_id", source_id="source_id", )
-
-
-
agent_id:
str
-
source_id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.agents.sources.detach(...)
-
-
-
Detach a source from an agent.
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.agents.sources.detach( agent_id="agent_id", source_id="source_id", )
-
-
-
agent_id:
str
-
source_id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.agents.sources.list(...)
-
-
-
Get the sources associated with an agent.
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.agents.sources.list( agent_id="agent_id", )
-
-
-
agent_id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.agents.core_memory.retrieve(...)
-
-
-
Retrieve the memory state of a specific agent. This endpoint fetches the current memory state of the agent identified by the user ID and agent ID.
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.agents.core_memory.retrieve( agent_id="agent_id", )
-
-
-
agent_id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.agents.blocks.retrieve(...)
-
-
-
Retrieve a core memory block from an agent.
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.agents.blocks.retrieve( agent_id="agent_id", block_label="block_label", )
-
-
-
agent_id:
str
-
block_label:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.agents.blocks.modify(...)
-
-
-
Updates a core memory block of an agent.
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.agents.blocks.modify( agent_id="agent_id", block_label="block_label", )
-
-
-
agent_id:
str
-
block_label:
str
-
value:
typing.Optional[str]— Value of the block.
-
limit:
typing.Optional[int]— Character limit of the block.
-
name:
typing.Optional[str]— Name of the block if it is a template.
-
is_template:
typing.Optional[bool]— Whether the block is a template (e.g. saved human/persona options).
-
label:
typing.Optional[str]— Label of the block (e.g. 'human', 'persona') in the context window.
-
description:
typing.Optional[str]— Description of the block.
-
metadata:
typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]— Metadata of the block.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.agents.blocks.list(...)
-
-
-
Retrieve the core memory blocks of a specific agent.
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.agents.blocks.list( agent_id="agent_id", )
-
-
-
agent_id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.agents.blocks.attach(...)
-
-
-
Attach a core memoryblock to an agent.
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.agents.blocks.attach( agent_id="agent_id", block_id="block_id", )
-
-
-
agent_id:
str
-
block_id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.agents.blocks.detach(...)
-
-
-
Detach a core memory block from an agent.
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.agents.blocks.detach( agent_id="agent_id", block_id="block_id", )
-
-
-
agent_id:
str
-
block_id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.agents.passages.list(...)
-
-
-
Retrieve the memories in an agent's archival memory store (paginated query).
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.agents.passages.list( agent_id="agent_id", )
-
-
-
agent_id:
str
-
after:
typing.Optional[int]— Unique ID of the memory to start the query range at.
-
before:
typing.Optional[int]— Unique ID of the memory to end the query range at.
-
limit:
typing.Optional[int]— How many results to include in the response.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.agents.passages.create(...)
-
-
-
Insert a memory into an agent's archival memory store.
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.agents.passages.create( agent_id="agent_id", text="text", )
-
-
-
agent_id:
str
-
text:
str— Text to write to archival memory.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.agents.passages.delete(...)
-
-
-
Delete a memory from an agent's archival memory store.
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.agents.passages.delete( agent_id="agent_id", memory_id="memory_id", )
-
-
-
agent_id:
str
-
memory_id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.agents.messages.list(...)
-
-
-
Retrieve message history for an agent.
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.agents.messages.list( agent_id="agent_id", )
-
-
-
agent_id:
str
-
after:
typing.Optional[str]— Message after which to retrieve the returned messages.
-
before:
typing.Optional[str]— Message before which to retrieve the returned messages.
-
limit:
typing.Optional[int]— Maximum number of messages to retrieve.
-
use_assistant_message:
typing.Optional[bool]— Whether to use assistant messages
-
assistant_message_tool_name:
typing.Optional[str]— The name of the designated message tool.
-
assistant_message_tool_kwarg:
typing.Optional[str]— The name of the message argument.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.agents.messages.create(...)
-
-
-
Process a user message and return the agent's response. This endpoint accepts a message from a user and processes it through the agent.
-
-
-
from letta_client import Letta, MessageCreate client = Letta( token="YOUR_TOKEN", ) client.agents.messages.create( agent_id="agent_id", messages=[ MessageCreate( role="user", content="content", ) ], )
-
-
-
agent_id:
str
-
messages:
typing.Sequence[MessageCreate]— The messages to be sent to the agent.
-
use_assistant_message:
typing.Optional[bool]— Whether the server should parse specific tool call arguments (defaultsend_message) asAssistantMessageobjects.
-
assistant_message_tool_name:
typing.Optional[str]— The name of the designated message tool.
-
assistant_message_tool_kwarg:
typing.Optional[str]— The name of the message argument in the designated message tool.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.agents.messages.modify(...)
-
-
-
Update the details of a message associated with an agent.
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.agents.messages.modify( agent_id="agent_id", message_id="message_id", )
-
-
-
agent_id:
str
-
message_id:
str
-
role:
typing.Optional[MessageRole]— The role of the participant.
-
content:
typing.Optional[MessageUpdateContent]— The content of the message.
-
name:
typing.Optional[str]— The name of the participant.
-
tool_calls:
typing.Optional[typing.Sequence[ChatCompletionMessageToolCallInput]]— The list of tool calls requested.
-
tool_call_id:
typing.Optional[str]— The id of the tool call.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.agents.messages.create_stream(...)
-
-
-
Process a user message and return the agent's response. This endpoint accepts a message from a user and processes it through the agent. It will stream the steps of the response always, and stream the tokens if 'stream_tokens' is set to True.
-
-
-
from letta_client import Letta, MessageCreate client = Letta( token="YOUR_TOKEN", ) response = client.agents.messages.create_stream( agent_id="agent_id", messages=[ MessageCreate( role="user", content="content", ) ], ) for chunk in response: yield chunk
-
-
-
agent_id:
str
-
messages:
typing.Sequence[MessageCreate]— The messages to be sent to the agent.
-
use_assistant_message:
typing.Optional[bool]— Whether the server should parse specific tool call arguments (defaultsend_message) asAssistantMessageobjects.
-
assistant_message_tool_name:
typing.Optional[str]— The name of the designated message tool.
-
assistant_message_tool_kwarg:
typing.Optional[str]— The name of the message argument in the designated message tool.
-
stream_tokens:
typing.Optional[bool]— Flag to determine if individual tokens should be streamed. Set to True for token streaming (requires stream_steps = True).
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.agents.messages.create_async(...)
-
-
-
Asynchronously process a user message and return a run object. The actual processing happens in the background, and the status can be checked using the run ID.
-
-
-
from letta_client import Letta, MessageCreate client = Letta( token="YOUR_TOKEN", ) client.agents.messages.create_async( agent_id="agent_id", messages=[ MessageCreate( role="user", content="content", ) ], )
-
-
-
agent_id:
str
-
messages:
typing.Sequence[MessageCreate]— The messages to be sent to the agent.
-
use_assistant_message:
typing.Optional[bool]— Whether the server should parse specific tool call arguments (defaultsend_message) asAssistantMessageobjects.
-
assistant_message_tool_name:
typing.Optional[str]— The name of the designated message tool.
-
assistant_message_tool_kwarg:
typing.Optional[str]— The name of the message argument in the designated message tool.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.agents.templates.create_version(...)
-
-
-
This endpoint is only available on Letta Cloud.
Creates a new version of the template version of the agent.
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.agents.templates.create_version( agent_id="agent_id", )
-
-
-
agent_id:
str— The agent ID of the agent to migrate, if this agent is not a template, it will create a agent template from the agent provided as well
-
return_agent_state:
typing.Optional[bool]
-
migrate_deployed_agents:
typing.Optional[bool]
-
message:
typing.Optional[str]
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.agents.templates.migrate(...)
-
-
-
This endpoint is only available on Letta Cloud.
Migrate an agent to a new versioned agent template.
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.agents.templates.migrate( agent_id="agent_id", to_template="to_template", preserve_core_memories=True, )
-
-
-
agent_id:
str
-
to_template:
str
-
preserve_core_memories:
bool
-
variables:
typing.Optional[typing.Dict[str, str]]— If you chose to not preserve core memories, you should provide the new variables for the core memories
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.agents.templates.create(...)
-
-
-
This endpoint is only available on Letta Cloud.
Creates a template from an agent.
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.agents.templates.create( agent_id="agent_id", )
-
-
-
agent_id:
str
-
project:
typing.Optional[str]
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.agents.memory_variables.list(...)
-
-
-
This endpoint is only available on Letta Cloud.
Returns the memory variables associated with an agent.
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.agents.memory_variables.list( agent_id="agent_id", )
-
-
-
agent_id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.sources.files.upload(...)
-
-
-
Upload a file to a data source.
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.sources.files.upload( source_id="source_id", )
-
-
-
source_id:
str
-
file: `from future import annotations
core.File` — See core.File for more documentation
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.sources.files.list(...)
-
-
-
List paginated files associated with a data source.
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.sources.files.list( source_id="source_id", )
-
-
-
source_id:
str
-
limit:
typing.Optional[int]— Number of files to return
-
after:
typing.Optional[str]— Pagination cursor to fetch the next set of results
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.sources.files.delete(...)
-
-
-
Delete a data source.
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.sources.files.delete( source_id="source_id", file_id="file_id", )
-
-
-
source_id:
str
-
file_id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.sources.passages.list(...)
-
-
-
List all passages associated with a data source.
-
-
-
from letta_client import Letta client = Letta( token="YOUR_TOKEN", ) client.sources.passages.list( source_id="source_id", )
-
-
-
source_id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-