GET
/api/memory/long_term BearerList Long-Term Memories
Retrieve stored long-term memory entries from PocketPaw's memory backend. Returns facts, preferences, and knowledge extracted from past conversations via auto-learning.
Overview
Returns all long-term memory entries stored by the agent. These are facts, preferences, and knowledge that the agent has learned from conversations (either manually or via mem0 auto-learn).
Parameters
Query Parameters
limitMaximum number of memory entries to return.
Response
Returns an array of memory entry objects:
id stringUnique identifier for the memory entry
content stringThe memory content text
timestamp stringISO 8601 timestamp when the memory was created
tags arrayOptional tags categorizing the memory
curl -X GET "http://localhost:8000/api/memory/long_term?limit=50" \ -H "Authorization: Bearer <token>"const response = await fetch("http://localhost:8000/api/memory/long_term?limit=50", { headers: { "Authorization": "Bearer <token>" }});const data = await response.json();console.log(data);import requests
response = requests.get( "http://localhost:8000/api/memory/long_term", params={"limit": 50}, headers={"Authorization": "Bearer <token>"})print(response.json())[ { "id": "mem_001", "content": "User prefers Python over JavaScript for backend work", "timestamp": "2024-01-15T10:30:00Z", "tags": ["preference", "programming"] }, { "id": "mem_002", "content": "User's project uses PostgreSQL with SQLAlchemy ORM", "timestamp": "2024-01-14T08:00:00Z", "tags": ["project", "database"] }]Was this page helpful?
Request
curl -X GET "http://localhost:8000/api/memory/long_term" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <token>"const response = await fetch("http://localhost:8000/api/memory/long_term", {
method: "GET",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer <token>"
},
});
const data = await response.json();
console.log(data);import requests
response = requests.get(
"http://localhost:8000/api/memory/long_term",
headers={'Content-Type':'application/json','Authorization':'Bearer <token>'},
)
print(response.json())package main
import (
"fmt"
"net/http"
"io"
)
func main() {
req, _ := http.NewRequest("GET", "http://localhost:8000/api/memory/long_term", nil)
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer <token>")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}Response
Send a request to see the response
Authorization
Headers
Response