{
"path": "/3m36irobcmk2n",
"site": "at://did:plc:da6iyhwpub7pnqbj5booh2by/site.standard.publication/3m2p7f6h6h226",
"$type": "site.standard.document",
"title": "How does Thomas' memory work?",
"content": {
"$type": "pub.leaflet.content",
"pages": [
{
"$type": "pub.leaflet.pages.linearDocument",
"blocks": [
{
"$type": "pub.leaflet.pages.linearDocument#block",
"block": {
"$type": "pub.leaflet.blocks.text",
"facets": [],
"plaintext": "I've been thinking about how to the AI agent's(I'm calling Thomas) what memory should look like. So far I've come up with these requirements."
}
},
{
"$type": "pub.leaflet.pages.linearDocument#block",
"block": {
"$type": "pub.leaflet.blocks.unorderedList",
"children": [
{
"$type": "pub.leaflet.blocks.unorderedList#listItem",
"content": {
"$type": "pub.leaflet.blocks.text",
"facets": [],
"plaintext": "It should be fast. Blazingly so. There should be minimal delay. My reasoning is that the LLM client isn't very responsive with limited resources and that's where I want to allocate the slack in the system. If there's an issue with I/O of the model, the database will need to be queried several times."
},
"children": []
},
{
"$type": "pub.leaflet.blocks.unorderedList#listItem",
"content": {
"$type": "pub.leaflet.blocks.text",
"facets": [],
"plaintext": "The database should store text blocks well. If it doesn't support a blob, it's not for me."
},
"children": []
},
{
"$type": "pub.leaflet.blocks.unorderedList#listItem",
"content": {
"$type": "pub.leaflet.blocks.text",
"facets": [],
"plaintext": "I prefer relational databases. It's easier for me to get my head around the structures. I think they are better for the developer experience."
},
"children": []
},
{
"$type": "pub.leaflet.blocks.unorderedList#listItem",
"content": {
"$type": "pub.leaflet.blocks.text",
"facets": [],
"plaintext": "I should have the options of adding a vector database later. Improving a systems memory storage is never a bad thing. This isn't a hard requirement but definitely a nice to have."
},
"children": []
}
]
}
},
{
"$type": "pub.leaflet.pages.linearDocument#block",
"block": {
"$type": "pub.leaflet.blocks.text",
"facets": [],
"plaintext": "ChatGPT pointed me toward Postgres, and I agree - it’s the clear winner. Here’s why:"
}
},
{
"$type": "pub.leaflet.pages.linearDocument#block",
"block": {
"$type": "pub.leaflet.blocks.unorderedList",
"children": [
{
"$type": "pub.leaflet.blocks.unorderedList#listItem",
"content": {
"$type": "pub.leaflet.blocks.text",
"facets": [],
"plaintext": "Speed is great, especially with indexes (timestamps, importance scores, etc.)."
},
"children": []
},
{
"$type": "pub.leaflet.blocks.unorderedList#listItem",
"content": {
"$type": "pub.leaflet.blocks.text",
"facets": [
{
"index": {
"byteEnd": 29,
"byteStart": 25
},
"features": [
{
"$type": "pub.leaflet.richtext.facet#code"
}
]
},
{
"index": {
"byteEnd": 36,
"byteStart": 31
},
"features": [
{
"$type": "pub.leaflet.richtext.facet#code"
}
]
},
{
"index": {
"byteEnd": 51,
"byteStart": 46
},
"features": [
{
"$type": "pub.leaflet.richtext.facet#code"
}
]
}
],
"plaintext": "Text handling is strong (TEXT, BYTEA, or even JSONB for flexible structures)."
},
"children": []
},
{
"$type": "pub.leaflet.blocks.unorderedList#listItem",
"content": {
"$type": "pub.leaflet.blocks.text",
"facets": [],
"plaintext": "It fits the relational mindset perfectly."
},
"children": []
},
{
"$type": "pub.leaflet.blocks.unorderedList#listItem",
"content": {
"$type": "pub.leaflet.blocks.text",
"facets": [
{
"index": {
"byteEnd": 17,
"byteStart": 9
},
"features": [
{
"$type": "pub.leaflet.richtext.facet#code"
}
]
}
],
"plaintext": "And with pgvector, I can add embeddings later without re-architecting."
},
"children": []
}
]
}
},
{
"$type": "pub.leaflet.pages.linearDocument#block",
"block": {
"$type": "pub.leaflet.blocks.text",
"facets": [],
"plaintext": "Where I diverged from ChatGPT was in the schema design. Their sketch felt too vague, so I put together my own."
}
},
{
"$type": "pub.leaflet.pages.linearDocument#block",
"block": {
"$type": "pub.leaflet.blocks.text",
"facets": [],
"plaintext": "The CoreMemory table will store data related to personality, safety protocols, and the principles that define who the bot “believes” it is. I’ll also create a Persona table to capture all interactions with new entities, which allows me to manage or blacklist troublesome ones. The memory model loosely mirrors human cognition - short-term and long-term memory separated. It’s an intentional oversimplification to keep the MVP lightweight; I’d rather build something functional now than over-engineer. Over time, I can refine it further, but this foundation gives the system a clear psychological architecture: identity, memory, relationships, and reflections."
}
},
{
"$type": "pub.leaflet.pages.linearDocument#block",
"block": {
"$type": "pub.leaflet.blocks.text",
"facets": [],
"plaintext": "Anyways, I'm back from my vacation and should make progress on this again."
}
}
]
}
]
},
"description": "Part 2 of building an Agentic AI with augmented memory",
"publishedAt": "2025-10-14T19:49:40.370Z"
}