List Blocks

Authentication

AuthorizationBearer

Header authentication of the form Bearer <token>

Query Parameters

labelstring or nullOptional

Labels to include (e.g. human, persona)

templates_onlybooleanOptionalDefaults to false
Whether to include only templates
namestring or nullOptional
Name of the block
identity_idstring or nullOptional
Search agents by identifier id
identifier_keyslist of strings or nullOptional
Search agents by identifier keys
project_idstring or nullOptional
Search blocks by project id
limitinteger or nullOptionalDefaults to 50
Number of blocks to return
beforestring or nullOptional
Block ID cursor for pagination. Returns blocks that come before this block ID in the specified sort order
afterstring or nullOptional
Block ID cursor for pagination. Returns blocks that come after this block ID in the specified sort order
orderenumOptionalDefaults to asc
Sort order for blocks by creation time. 'asc' for oldest first, 'desc' for newest first
Allowed values:
order_by"created_at"Optional
Field to sort by
connected_to_agents_count_gtinteger or nullOptional
Filter blocks by the number of connected agents. If provided, returns blocks that have more than this number of connected agents.
connected_to_agents_count_ltinteger or nullOptional
Filter blocks by the number of connected agents. If provided, returns blocks that have less than this number of connected agents.
connected_to_agents_count_eqlist of integers or nullOptional
Filter blocks by the exact number of connected agents. If provided, returns blocks that have exactly this number of connected agents.

Response

Successful Response
valuestring
Value of the block.
idstring
The id of the block.
limitinteger or nullDefaults to 20000
Character limit of the block.
project_idstring or null
The associated project id.
is_templateboolean or nullDefaults to false

Whether the block is a template (e.g. saved human/persona options).

labelstring or null

Label of the block (e.g. ‘human’, ‘persona’) in the context window.

descriptionstring or null
Description of the block.
metadatamap from strings to any or null
Metadata of the block.
created_by_idstring or null
The id of the user that made this Block.
last_updated_by_idstring or null
The id of the user that last updated this Block.
template_namestring or nullDeprecated

(Deprecated) The name of the block template (if it is a template).

template_idstring or nullDeprecated

(Deprecated) The id of the template.

base_template_idstring or nullDeprecated

(Deprecated) The base template id of the block.

deployment_idstring or nullDeprecated

(Deprecated) The id of the deployment.

entity_idstring or nullDeprecated

(Deprecated) The id of the entity within the template.

preserve_on_migrationboolean or nullDefaults to falseDeprecated

(Deprecated) Preserve the block on template migration.

read_onlyboolean or nullDefaults to falseDeprecated

(Deprecated) Whether the agent has read-only access to the block.

hiddenboolean or nullDeprecated

(Deprecated) If set to True, the block will be hidden.

Errors