cd /news/ai-agents/ditching-json-sql-friction-designing… · home topics ai-agents article
[ARTICLE · art-57821] src=dev.to ↗ pub= topic=ai-agents verified=true sentiment=↑ positive

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.

read1 min views1 publishedJul 13, 2026

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<String, serde_json::Value>,
    pub updated_at: i64,
}
── more in #ai-agents 4 stories · sorted by recency
── more on @thingd 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/ditching-json-sql-fr…] indexed:0 read:1min 2026-07-13 ·