curl -X POST \
"http://localhost:8000/api/v2/agents/my-agent/memories/b7c3cf31-e537-49f1-abc4-c50ac6adeac5/restore" \
-H "X-Session-Token: your_session_token"
{
"agent_id": "my-agent",
"session_id": "sess_cf824a95d305",
"memory_id": "b7c3cf31-e537-49f1-abc4-c50ac6adeac5",
"status": "active"
}
{
"detail": "Memory 'b7c3cf31-e537-49f1-abc4-c50ac6adeac5' was not found."
}
{
"detail": "Missing session token. Use X-Session-Token header."
}
Data
Restore Memory
Return an expired memory to the active state.
POST
/
api
/
v2
/
agents
/
{agent_id}
/
memories
/
{memory_id}
/
restore
curl -X POST \
"http://localhost:8000/api/v2/agents/my-agent/memories/b7c3cf31-e537-49f1-abc4-c50ac6adeac5/restore" \
-H "X-Session-Token: your_session_token"
{
"agent_id": "my-agent",
"session_id": "sess_cf824a95d305",
"memory_id": "b7c3cf31-e537-49f1-abc4-c50ac6adeac5",
"status": "active"
}
{
"detail": "Memory 'b7c3cf31-e537-49f1-abc4-c50ac6adeac5' was not found."
}
{
"detail": "Missing session token. Use X-Session-Token header."
}
Overview
Returns anexpired memory to active and clears its expiry stamp entirely —
expired_at and expired_by are removed from the stored document, not left
behind.
See the Memory Lifecycle reference for the model.
Authentication
API clients do not send an API key orAuthorization header.
Session token from Activate Agent. Must match
agent_id.Path Parameters
curl -X POST \
"http://localhost:8000/api/v2/agents/my-agent/memories/b7c3cf31-e537-49f1-abc4-c50ac6adeac5/restore" \
-H "X-Session-Token: your_session_token"
{
"agent_id": "my-agent",
"session_id": "sess_cf824a95d305",
"memory_id": "b7c3cf31-e537-49f1-abc4-c50ac6adeac5",
"status": "active"
}
{
"detail": "Memory 'b7c3cf31-e537-49f1-abc4-c50ac6adeac5' was not found."
}
{
"detail": "Missing session token. Use X-Session-Token header."
}
Notes
- Restoring a memory that is already
activeis harmless — it simply re-writes the record with no stamp. - A memory removed by Delete Memory or Purge Expired Memories cannot be restored.
- A later policy sweep can expire the memory again if it still matches a rule.
Next Steps
- Expire Memory
- Get Expiry Policy to see what would re-expire it