Retrieve Block For Agent
agents.blocks.retrieve(strblock_label, BlockRetrieveParams**kwargs) -> BlockResponse
/v1/agents/{agent_id}/core-memory/blocks/{block_label}
Retrieve a core memory block from an agent.
Parameters
block_label: str
Returns
Retrieve Block For Agent
from letta_client import Letta
client = Letta(
api_key="My API Key",
)
block_response = client.agents.blocks.retrieve(
block_label="block_label",
agent_id="agent-123e4567-e89b-42d3-8456-426614174000",
)
print(block_response.id)
{
"id": "id",
"value": "value",
"base_template_id": "base_template_id",
"created_by_id": "created_by_id",
"deployment_id": "deployment_id",
"description": "description",
"entity_id": "entity_id",
"hidden": true,
"is_template": true,
"label": "label",
"last_updated_by_id": "last_updated_by_id",
"limit": 0,
"metadata": {
"foo": "bar"
},
"preserve_on_migration": true,
"project_id": "project_id",
"read_only": true,
"template_id": "template_id",
"template_name": "template_name"
}Returns Examples
{
"id": "id",
"value": "value",
"base_template_id": "base_template_id",
"created_by_id": "created_by_id",
"deployment_id": "deployment_id",
"description": "description",
"entity_id": "entity_id",
"hidden": true,
"is_template": true,
"label": "label",
"last_updated_by_id": "last_updated_by_id",
"limit": 0,
"metadata": {
"foo": "bar"
},
"preserve_on_migration": true,
"project_id": "project_id",
"read_only": true,
"template_id": "template_id",
"template_name": "template_name"
}