Skip to content
  • Auto
  • Light
  • Dark
DiscordForumGitHubSign up
View as Markdown
Copy Markdown

Open in Claude
Open in ChatGPT

Blocks

Retrieve Block For Agent
agents.blocks.retrieve(strblock_label, BlockRetrieveParams**kwargs) -> BlockResponse
get/v1/agents/{agent_id}/core-memory/blocks/{block_label}
Modify Block For Agent
agents.blocks.modify(strblock_label, BlockModifyParams**kwargs) -> BlockResponse
patch/v1/agents/{agent_id}/core-memory/blocks/{block_label}
List Blocks For Agent
agents.blocks.list(stragent_id, BlockListParams**kwargs) -> SyncArrayPage[BlockResponse]
get/v1/agents/{agent_id}/core-memory/blocks
Attach Block To Agent
agents.blocks.attach(strblock_id, BlockAttachParams**kwargs) -> AgentState
patch/v1/agents/{agent_id}/core-memory/blocks/attach/{block_id}
Detach Block From Agent
agents.blocks.detach(strblock_id, BlockDetachParams**kwargs) -> AgentState
patch/v1/agents/{agent_id}/core-memory/blocks/detach/{block_id}
ModelsExpand Collapse
class Block:

A Block represents a reserved section of the LLM's context window.

value: str

Value of the block.

id: Optional[str]

The human-friendly ID of the Block

base_template_id: Optional[str]

The base template id of the block.

created_by_id: Optional[str]

The id of the user that made this Block.

deployment_id: Optional[str]

The id of the deployment.

description: Optional[str]

Description of the block.

entity_id: Optional[str]

The id of the entity within the template.

hidden: Optional[bool]

If set to True, the block will be hidden.

is_template: Optional[bool]

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

label: Optional[str]

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

last_updated_by_id: Optional[str]

The id of the user that last updated this Block.

limit: Optional[int]

Character limit of the block.

metadata: Optional[Dict[str, object]]

Metadata of the block.

preserve_on_migration: Optional[bool]

Preserve the block on template migration.

project_id: Optional[str]

The associated project id.

read_only: Optional[bool]

Whether the agent has read-only access to the block.

template_id: Optional[str]

The id of the template.

template_name: Optional[str]

Name of the block if it is a template.

class BlockModify:

Update a block

base_template_id: Optional[str]

The base template id of the block.

deployment_id: Optional[str]

The id of the deployment.

description: Optional[str]

Description of the block.

entity_id: Optional[str]

The id of the entity within the template.

hidden: Optional[bool]

If set to True, the block will be hidden.

is_template: Optional[bool]

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

label: Optional[str]

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

limit: Optional[int]

Character limit of the block.

metadata: Optional[Dict[str, object]]

Metadata of the block.

preserve_on_migration: Optional[bool]

Preserve the block on template migration.

project_id: Optional[str]

The associated project id.

read_only: Optional[bool]

Whether the agent has read-only access to the block.

template_id: Optional[str]

The id of the template.

template_name: Optional[str]

Name of the block if it is a template.

value: Optional[str]

Value of the block.