Ditching JSON & SQL Friction: Designing an Object-Shaped Memory Engine (Part 2) A developer building for AI agents designed thingd, an object-shaped memory engine in Rust that uses SQLite as its storage engine but exposes it as a high-performance object store. The engine treats every data point as a 'thing'—an object primitive with identity, properties, and relationships—bypassing traditional ORM bloat and the friction of relational databases or document stores for agent state management. For a long time, backend engineering has been divided into two camps: Relational databases SQL for rigid, structured tables, and Document stores NoSQL/JSON for flexible, unstructured data. But when you are building for AI Agents, both of these traditional approaches introduce massive architectural friction. AI agents don't think in rows, columns, or complex foreign key joins. They don't want to parse heavily nested, arbitrary JSON text blobs either. Agents think in state, context, and entities . They operate best when data looks exactly like the object structures they manipulate in their runtime environments. When I designed the core primitives for thingd , I wanted the absolute speed of a local relational database combined with the flexibility of an object-first paradigm. Here is how we bypassed the typical ORM bloat and built an object-shaped memory engine natively in Rust. If you hook an autonomous agent loop up to a traditional Postgres or MySQL instance using an ORM like Prisma or TypeORM, you run into three main problems: We needed something local-first, structurally dynamic, and blazing fast. To solve this, thingd uses SQLite as its storage engine, but exposes it completely as a high-performance Object Store . Instead of forcing developers or agents to write queries or handle migrations, thingd abstracts the database into an entity-first system. Every data point is treated as a "thing"—an object primitive with its own identity, properties, and relationships. Because the underlying engine is written in Rust, we get to take advantage of zero-cost abstractions: rust // A simplified look at how thingd handles dynamic object primitives internally derive Serialize, Deserialize, Debug, Clone pub struct ThingObject { pub id: String, pub entity type: String, pub properties: HashMap