List Blocks
client.blocks.list(BlockListParams { after, before, connected_to_agents_count_eq, 14 more } query?, RequestOptionsoptions?): ArrayPage<BlockResponse { id, value, base_template_id, 15 more } >
/v1/blocks/
List Blocks
Parameters
Returns
List Blocks
import Letta from '@letta-ai/letta-client';
const client = new Letta({
apiKey: 'My API Key',
});
// Automatically fetches more pages as needed.
for await (const blockResponse of client.blocks.list()) {
console.log(blockResponse.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"
}
]