garden.engram.getMemoryGraph

hailey.at

Documentation

A space's newest memories and links between the ones that mean similar things, for drawing the space as a graph. Only memories indexed with the space's model are included. Each memory links to its nearest neighbors among the memories returned. Same authentication as garden.engram.searchMemories.

main query

A space's newest memories and links between the ones that mean similar things, for drawing the space as a graph. Only memories indexed with the space's model are included. Each memory links to its nearest neighbors among the memories returned. Same authentication as garden.engram.searchMemories.

Parameters

limit integer Optional

How many of the newest memories to include.

minSimilarity string Optional

A number above 0 and at most 1 (default 0.4): the cosine similarity a pair needs to be linked.

neighbors integer Optional

How many of its most similar memories each memory links to.

space string Required

The space URI.

Output

Encodingapplication/json
edges array Required

No description available.

nodes array Required

Newest first.

Errors

UnknownSpace This service does not index the space.
NoModel The space has not declared an embedding model.
Try It

Requests are sent directly from your browser. Some servers may block requests due to CORS.

Base URL for XRPC calls (e.g., https://api.bsky.social)
Parameters
How many of the newest memories to include.
A number above 0 and at most 1 (default 0.4): the cosine similarity a pair needs to be linked.
How many of its most similar memories each memory links to.
The space URI.
View raw schema
{
  "description": "A space's newest memories and links between the ones that mean similar things, for drawing the space as a graph. Only memories indexed with the space's model are included. Each memory links to its nearest neighbors among the memories returned. Same authentication as garden.engram.searchMemories.",
  "errors": [
    {
      "description": "This service does not index the space.",
      "name": "UnknownSpace"
    },
    {
      "description": "The space has not declared an embedding model.",
      "name": "NoModel"
    }
  ],
  "output": {
    "encoding": "application/json",
    "schema": {
      "properties": {
        "edges": {
          "items": {
            "properties": {
              "a": {
                "description": "Position of one memory in nodes. Always smaller than b.",
                "type": "integer"
              },
              "b": {
                "description": "Position of the other memory in nodes.",
                "type": "integer"
              },
              "similarity": {
                "description": "Cosine similarity, times 1000.",
                "maximum": 1000,
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "a",
              "b",
              "similarity"
            ],
            "type": "object"
          },
          "type": "array"
        },
        "nodes": {
          "description": "Newest first.",
          "items": {
            "ref": "garden.engram.defs#memoryView",
            "type": "ref"
          },
          "type": "array"
        }
      },
      "required": [
        "nodes",
        "edges"
      ],
      "type": "object"
    }
  },
  "parameters": {
    "properties": {
      "limit": {
        "default": 200,
        "description": "How many of the newest memories to include.",
        "maximum": 500,
        "minimum": 1,
        "type": "integer"
      },
      "minSimilarity": {
        "description": "A number above 0 and at most 1 (default 0.4): the cosine similarity a pair needs to be linked.",
        "type": "string"
      },
      "neighbors": {
        "default": 3,
        "description": "How many of its most similar memories each memory links to.",
        "maximum": 8,
        "minimum": 1,
        "type": "integer"
      },
      "space": {
        "description": "The space URI.",
        "type": "string"
      }
    },
    "required": [
      "space"
    ],
    "type": "params"
  },
  "type": "query"
}

Lexicon Garden

@