agents
Add Agent Memory Block
Creates a memory block and links it to the agent.
POST
/
v1
/
agents
/
{agent_id}
/
memory
/
block
Authorizations
Authorization
string
headerrequiredBearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Path Parameters
agent_id
string
requiredBody
application/json
Create a block
value
string
requiredValue of the block.
label
string
requiredLabel of the block.
limit
integer
default: 2000Character limit of the block.
name
string | null
Name of the block if it is a template.
is_template
boolean
default: truedescription
string | null
Description of the block.
metadata_
object | null
Metadata of the block.
Response
200 - application/json
Represents the in-context memory of the agent. This includes both the Block
objects (labelled by sections), as well as tools to edit the blocks.
Attributes: memory (Dict[str, Block]): Mapping from memory block section to memory block.
memory
object
Mapping from memory block section to memory block.
prompt_template
string
default: {% for block in memory.values() %}<{{ 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