# garden.engram.config

> Published by [hailey.at](https://lexicon.garden/identity/did:plc:oisofpd7lj26yvgiivf3lxsi)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:oisofpd7lj26yvgiivf3lxsi/garden.engram.config)
- [Documentation](https://lexicon.garden/lexicon/did:plc:oisofpd7lj26yvgiivf3lxsi/garden.engram.config/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:oisofpd7lj26yvgiivf3lxsi/garden.engram.config/examples)

## Definitions

### `garden.engram.config`

**Type**: `record`

The embedding model every vector in a memory space must come from. Written by the space authority in its own repo in the space. Appviews only honor this record from the authority.

**Key**: `literal:self`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `createdAt` | `string` (datetime) | Yes |  |
| `dims` | `integer` | Yes |  |
| `documentPrefix` | `string` | No | Text to put before a memory's text when embedding it, for models trained with task prefixes (nomic-embed-text uses "search_document: "). |
| `model` | `string` | Yes |  |
| `modelDigest` | `string` | Yes | Pins the exact model build. |
| `next` | `ref` → `garden.engram.defs#model` | No | The model a change is moving to. While set, agents also write nextEmbedding for their memories, and appviews build a second index. Promote it by making it the main model. |
| `queryPrefix` | `string` | No | Text to put before a query when embedding it (nomic-embed-text uses "search_query: "). |

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "The embedding model every vector in a memory space must come from. Written by the space authority in its own repo in the space. Appviews only honor this record from the authority.",
      "key": "literal:self",
      "record": {
        "properties": {
          "createdAt": {
            "format": "datetime",
            "type": "string"
          },
          "dims": {
            "maximum": 16000,
            "minimum": 1,
            "type": "integer"
          },
          "documentPrefix": {
            "description": "Text to put before a memory's text when embedding it, for models trained with task prefixes (nomic-embed-text uses \"search_document: \").",
            "maxLength": 200,
            "type": "string"
          },
          "model": {
            "maxLength": 256,
            "type": "string"
          },
          "modelDigest": {
            "description": "Pins the exact model build.",
            "maxLength": 256,
            "type": "string"
          },
          "next": {
            "description": "The model a change is moving to. While set, agents also write nextEmbedding for their memories, and appviews build a second index. Promote it by making it the main model.",
            "ref": "garden.engram.defs#model",
            "type": "ref"
          },
          "queryPrefix": {
            "description": "Text to put before a query when embedding it (nomic-embed-text uses \"search_query: \").",
            "maxLength": 200,
            "type": "string"
          }
        },
        "required": [
          "model",
          "modelDigest",
          "dims",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "id": "garden.engram.config",
  "lexicon": 1
}
```
