Skip to main content
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

id
string
This is the unique identifier for the memory.

Response

id
string
The unique identifier for the memory.
memory
string
The content of the memory that was stored.
memory_type
string
The type of memory (e.g., short-term, long-term).
user_id
string
The unique identifier for the user associated with the memory.
agent_id
string
The unique identifier for the agent that created the memory.
created_at
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"
    }
}