> ## Documentation Index
> Fetch the complete documentation index at: https://docs.memoclaw.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Memory Stats

> GET /v1/stats — Get memory usage statistics for your wallet.

<Snippet file="snippets/wallet-auth-callout.mdx" />

**Price:** FREE

Returns aggregate statistics about your stored memories, broken down by type and namespace.

## Response (200)

<ResponseField name="total_memories" type="number">
  Total number of active (non-deleted, non-expired) memories.
</ResponseField>

<ResponseField name="pinned_count" type="number">
  Number of pinned memories.
</ResponseField>

<ResponseField name="never_accessed" type="number">
  Memories that have never been recalled.
</ResponseField>

<ResponseField name="total_accesses" type="number">
  Sum of all access counts across all memories.
</ResponseField>

<ResponseField name="avg_importance" type="number">
  Average importance score across all memories.
</ResponseField>

<ResponseField name="oldest_memory" type="string">
  ISO 8601 timestamp of the oldest memory.
</ResponseField>

<ResponseField name="newest_memory" type="string">
  ISO 8601 timestamp of the newest memory.
</ResponseField>

<ResponseField name="by_type" type="array">
  Memory count grouped by type.
</ResponseField>

<ResponseField name="by_namespace" type="array">
  Memory count grouped by namespace.
</ResponseField>

## Example

<CodeGroup>
  ```bash curl theme={null}
  curl https://api.memoclaw.com/v1/stats
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch("https://api.memoclaw.com/v1/stats");
  const data = await response.json();
  ```

  ```python Python theme={null}
  from memoclaw import MemoClaw

  client = MemoClaw()
  stats = client.stats()
  print(f"Total memories: {stats.total_memories}")
  ```

  ```typescript TypeScript theme={null}
  const stats = await client.stats();
  console.log(`Total memories: ${stats.total_memories}`);
  ```
</CodeGroup>

```json Response theme={null}
{
  "total_memories": 142,
  "pinned_count": 8,
  "never_accessed": 23,
  "total_accesses": 891,
  "avg_importance": 0.64,
  "oldest_memory": "2025-06-01T08:00:00Z",
  "newest_memory": "2026-02-13T10:30:00Z",
  "by_type": [
    { "memory_type": "preference", "count": 45 },
    { "memory_type": "general", "count": 38 },
    { "memory_type": "observation", "count": 25 },
    { "memory_type": "decision", "count": 18 },
    { "memory_type": "project", "count": 12 },
    { "memory_type": "correction", "count": 4 }
  ],
  "by_namespace": [
    { "namespace": "default", "count": 89 },
    { "namespace": "project-memoclaw", "count": 35 },
    { "namespace": "client-acme", "count": 18 }
  ]
}
```
