mirror of
https://github.com/pocketpaw/pocketpaw.git
synced 2026-05-13 21:21:53 +00:00
Consolidate documentation from the separate pocketpaw-web repo into the main pocketpaw repo. This keeps docs and code in sync so PRs can update both atomically. - Remove docs/ from .gitignore - Remove docs' own .git (was pocketpaw/pocketpaw-web) - Add .github/workflows/deploy-docs.yml (builds from docs/ subdirectory) - Track all 120+ MDX pages, config, landing page, and public assets The separate pocketpaw-web repo can now be archived. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
66 lines
1.7 KiB
Plaintext
66 lines
1.7 KiB
Plaintext
---
|
|
title: Get Memory Stats
|
|
description: "Retrieve memory backend statistics including total entries stored, storage size, last auto-learn timestamp, and provider-specific metrics for monitoring memory system health."
|
|
api: GET /api/memory/stats
|
|
baseUrl: http://localhost:8000
|
|
layout: '@/layouts/APIEndpointLayout.astro'
|
|
auth: bearer
|
|
section: API Reference
|
|
ogType: article
|
|
keywords: ["memory stats", "storage metrics", "memory health"]
|
|
tags: ["api", "memory"]
|
|
---
|
|
|
|
## Overview
|
|
|
|
Returns statistics about the current memory backend, including the number of stored memories and the active backend type.
|
|
|
|
## Response
|
|
|
|
<ResponseField name="backend" type="string">Active memory backend (`file` or `mem0`)</ResponseField>
|
|
<ResponseField name="total_memories" type="integer">Total number of long-term memory entries</ResponseField>
|
|
|
|
<RequestExample>
|
|
<Tabs items={["cURL", "JavaScript", "Python"]}>
|
|
<Tab title="cURL">
|
|
```bash
|
|
curl -X GET "http://localhost:8000/api/memory/stats" \
|
|
-H "Authorization: Bearer <token>"
|
|
```
|
|
</Tab>
|
|
<Tab title="JavaScript">
|
|
```javascript
|
|
const response = await fetch("http://localhost:8000/api/memory/stats", {
|
|
headers: { "Authorization": "Bearer <token>" }
|
|
});
|
|
const data = await response.json();
|
|
console.log(data);
|
|
```
|
|
</Tab>
|
|
<Tab title="Python">
|
|
```python
|
|
import requests
|
|
|
|
response = requests.get(
|
|
"http://localhost:8000/api/memory/stats",
|
|
headers={"Authorization": "Bearer <token>"}
|
|
)
|
|
print(response.json())
|
|
```
|
|
</Tab>
|
|
</Tabs>
|
|
</RequestExample>
|
|
|
|
<ResponseExample>
|
|
<Tabs items={["200"]}>
|
|
<Tab title="200">
|
|
```json
|
|
{
|
|
"backend": "mem0",
|
|
"total_memories": 47
|
|
}
|
|
```
|
|
</Tab>
|
|
</Tabs>
|
|
</ResponseExample>
|