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

Open in Claude
Open in ChatGPT

Blocks

List Blocks
blocks.list(BlockListParams**kwargs) -> SyncArrayPage[BlockResponse]
get/v1/blocks/
Create Block
blocks.create(BlockCreateParams**kwargs) -> BlockResponse
post/v1/blocks/
Modify Block
blocks.modify(strblock_id, BlockModifyParams**kwargs) -> BlockResponse
patch/v1/blocks/{block_id}
Delete Block
blocks.delete(strblock_id) -> object
delete/v1/blocks/{block_id}
Retrieve Block
blocks.retrieve(strblock_id) -> BlockResponse
get/v1/blocks/{block_id}
ModelsExpand Collapse
class BlockResponse:
id: str

The id of the block.

value: str

Value of the block.

Deprecatedbase_template_id: Optional[str]

(Deprecated) The base template id of the block.

created_by_id: Optional[str]

The id of the user that made this Block.

Deprecateddeployment_id: Optional[str]

(Deprecated) The id of the deployment.

description: Optional[str]

Description of the block.

Deprecatedentity_id: Optional[str]

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

Deprecatedhidden: Optional[bool]

(Deprecated) 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.

Deprecatedpreserve_on_migration: Optional[bool]

(Deprecated) Preserve the block on template migration.

project_id: Optional[str]

The associated project id.

Deprecatedread_only: Optional[bool]

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

Deprecatedtemplate_id: Optional[str]

(Deprecated) The id of the template.

Deprecatedtemplate_name: Optional[str]

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

class CreateBlock:

Create a block

label: str

Label of the block.

value: str

Value of the 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]
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.

BlocksAgents

List Agents For Block
blocks.agents.list(strblock_id, AgentListParams**kwargs) -> SyncArrayPage[AgentState]
get/v1/blocks/{block_id}/agents