> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://stelltec.com/rhebok/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://stelltec.com/rhebok/docs/_mcp/server.

# List memories

GET http://127.0.0.1:7331/api/memories

Lists every memory in the memory pack. When memory is disabled in
config, or the pack cannot be read, `memories` is empty and
`unavailable` says why, so an empty store and a broken one look different.


Reference: https://stelltec.com/rhebok/docs/api/memories/list-memories

## Response

### 200

The memories, or why they cannot be listed.

- `memories` (list of Memory, required)
- `unavailable` (string, required, nullable) — Why memories cannot be listed (disabled, or the pack is unreadable), or null.

## Errors

### 421 Misdirected Request Error

The `Host` header does not name this dashboard (see the rules at the top of this page).

- `error` (string, required) — What went wrong, in plain words.

## Types

### Memory

- `id` (string, required) — The memory id, 12 hex characters.
- `uri` (string, required) — `memory://<kind>/<id>`.
- `doc_id` (string, required) — The id of the memory's node in the graph.
- `title` (string, required)
- `text` (string, required)
- `facts` (MemoryFacts, required)
- `project_name` (string, required, nullable) — The configured name of the memory's project, when one resolves.

### MemoryFacts

- `kind` (enum, required)
  - Allowed values: `lesson`, `fact`, `episode`
- `created` (integer, required) — Unix seconds.
- `origin` (enum, required)
  - Allowed values: `user`, `claude`, `distill`
- `confidence` (integer, required)
- `project` (string, optional) — The project path the memory is scoped to. Absent for a global memory.
- `session` (string, optional) — The session URI an episode was distilled from.
- `source_hash` (string, optional)
- `source_stamp` (string, optional)

## Examples

### listed

**Response**

```json
{
  "memories": [
    {
      "id": "a41c09e2f7b3",
      "uri": "memory://lesson/a41c09e2f7b3",
      "doc_id": "9c04e7d1aa3b46f28e5d0c71b2f9a863",
      "title": "One commit per pull request",
      "text": "One commit per pull request. Squash the branch before you open the PR, and again after review fixes land.",
      "facts": {
        "kind": "lesson",
        "created": 1763251200,
        "origin": "user",
        "confidence": 100
      },
      "project_name": null
    },
    {
      "id": "5d2e8b10c4fa",
      "uri": "memory://fact/5d2e8b10c4fa",
      "doc_id": "1b7f3e9a0c2d4e6f8a1b3c5d7e9f0a2b",
      "title": "The remote embedding endpoint needs a Bearer token",
      "text": "The remote embedding endpoint needs a Bearer token; rhebok reads it from RHEBOK_EMBED_TOKEN.",
      "facts": {
        "kind": "fact",
        "created": 1763337600,
        "origin": "claude",
        "confidence": 90,
        "project": "/Users/me/code/rhebok"
      },
      "project_name": "rhebok"
    }
  ],
  "unavailable": null
}
```

**SDK Code**

```python listed
import requests

url = "http://127.0.0.1:7331/api/memories"

response = requests.get(url)

print(response.json())
```

```javascript listed
const url = 'http://127.0.0.1:7331/api/memories';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go listed
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "http://127.0.0.1:7331/api/memories"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby listed
require 'uri'
require 'net/http'

url = URI("http://127.0.0.1:7331/api/memories")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
```

```java listed
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("http://127.0.0.1:7331/api/memories")
  .asString();
```

```php listed
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'http://127.0.0.1:7331/api/memories');

echo $response->getBody();
```

```csharp listed
using RestSharp;

var client = new RestClient("http://127.0.0.1:7331/api/memories");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
```

```swift listed
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "http://127.0.0.1:7331/api/memories")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### disabled

**Response**

```json
{
  "memories": [],
  "unavailable": "memory is disabled in config ([memory] enabled = false)"
}
```

**SDK Code**

```python disabled
import requests

url = "http://127.0.0.1:7331/api/memories"

response = requests.get(url)

print(response.json())
```

```javascript disabled
const url = 'http://127.0.0.1:7331/api/memories';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go disabled
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "http://127.0.0.1:7331/api/memories"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby disabled
require 'uri'
require 'net/http'

url = URI("http://127.0.0.1:7331/api/memories")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
```

```java disabled
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("http://127.0.0.1:7331/api/memories")
  .asString();
```

```php disabled
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'http://127.0.0.1:7331/api/memories');

echo $response->getBody();
```

```csharp disabled
using RestSharp;

var client = new RestClient("http://127.0.0.1:7331/api/memories");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
```

```swift disabled
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "http://127.0.0.1:7331/api/memories")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```