curl --location --request DELETE 'https://api.stateset.com/v1/memory' \
--header 'Content-Type: application/json' \
--header 'Authorization: Token <token>' \
--data-raw '{
"id": "1234abcd-5678-efgh-9101-ijklmnopqrst"
}'
mutation DeleteMemory(
$id: String!
) {
delete_memories (
objects: [$id]
) {
returning {
id
memory
memory_type
user_id
agent_id
created_at
}
}
}`;
const memory = await stateset.memory.create({
"id": "1234abcd-5678-efgh-9101-ijklmnopqrst",
"memory": "User prefers to receive notifications via email.",
"memory_type": "long-term",
"user_id": "user_1234abcd",
"agent_id": "agent_5678efgh",
"created_at": "2024-08-25T10:00:00Z"
})
{
"memory": {
"id": "1234abcd-5678-efgh-9101-ijklmnopqrst",
"memory": "User prefers to receive notifications via email.",
"memory_type": "long-term",
"user_id": "user_1234abcd",
"agent_id": "agent_5678efgh",
"created_at": "2024-08-25T10:00:00Z"
}
}
Delete Memory
This endpoint deletes a memory
DELETE
/
v1
/
memory
curl --location --request DELETE 'https://api.stateset.com/v1/memory' \
--header 'Content-Type: application/json' \
--header 'Authorization: Token <token>' \
--data-raw '{
"id": "1234abcd-5678-efgh-9101-ijklmnopqrst"
}'
mutation DeleteMemory(
$id: String!
) {
delete_memories (
objects: [$id]
) {
returning {
id
memory
memory_type
user_id
agent_id
created_at
}
}
}`;
const memory = await stateset.memory.create({
"id": "1234abcd-5678-efgh-9101-ijklmnopqrst",
"memory": "User prefers to receive notifications via email.",
"memory_type": "long-term",
"user_id": "user_1234abcd",
"agent_id": "agent_5678efgh",
"created_at": "2024-08-25T10:00:00Z"
})
{
"memory": {
"id": "1234abcd-5678-efgh-9101-ijklmnopqrst",
"memory": "User prefers to receive notifications via email.",
"memory_type": "long-term",
"user_id": "user_1234abcd",
"agent_id": "agent_5678efgh",
"created_at": "2024-08-25T10:00:00Z"
}
}
Body
string
This is the unique identifier for the memory.
Response
string
The unique identifier for the memory.
string
The content of the memory that was stored.
string
The type of memory (e.g., short-term, long-term).
string
The unique identifier for the user associated with the memory.
string
The unique identifier for the agent that created the memory.
string
The timestamp when the memory was created.
curl --location --request DELETE 'https://api.stateset.com/v1/memory' \
--header 'Content-Type: application/json' \
--header 'Authorization: Token <token>' \
--data-raw '{
"id": "1234abcd-5678-efgh-9101-ijklmnopqrst"
}'
mutation DeleteMemory(
$id: String!
) {
delete_memories (
objects: [$id]
) {
returning {
id
memory
memory_type
user_id
agent_id
created_at
}
}
}`;
const memory = await stateset.memory.create({
"id": "1234abcd-5678-efgh-9101-ijklmnopqrst",
"memory": "User prefers to receive notifications via email.",
"memory_type": "long-term",
"user_id": "user_1234abcd",
"agent_id": "agent_5678efgh",
"created_at": "2024-08-25T10:00:00Z"
})
{
"memory": {
"id": "1234abcd-5678-efgh-9101-ijklmnopqrst",
"memory": "User prefers to receive notifications via email.",
"memory_type": "long-term",
"user_id": "user_1234abcd",
"agent_id": "agent_5678efgh",
"created_at": "2024-08-25T10:00:00Z"
}
}
โI