Add Agent Memory Block

POST
/v1/agents/:agent_id/memory/block

Creates a memory block and links it to the agent.

Path parameters

agent_idstringRequired

Request

This endpoint expects an object.
valuestringRequired

Value of the block.

labelstringRequired

Label of the block.

limitintegerOptionalDefaults to 5000

Character limit of the block.

namestringOptional

Name of the block if it is a template.

is_templatebooleanOptionalDefaults to false
descriptionstringOptional

Description of the block.

metadata_map from strings to anyOptional

Metadata of the block.

Response

Successful Response

blockslist of objects

Memory blocks contained in the agent’s in-context memory

prompt_templatestringOptionalDefaults to {% for block in blocks %}<{{ block.label }} characters="{{ block.value|length }}/{{ block.limit }}"> {{ block.value }} </{{ block.label }}>{% if not loop.last %} {% endif %}{% endfor %}

Jinja2 template for compiling memory blocks into a prompt string

Errors

Built with