Skip to main content

On This Page

Ditching JSON & SQL Friction: How thingd Builds an Object-Shaped Memory Engine for AI Agents

2 min read
Share

These articles are AI-generated summaries. Please check the original sources for full details.

Ditching JSON & SQL Friction: Designing an Object-Shaped Memory Engine (Part 2)

Sayan Mohsin designed thingd, an object-shaped memory engine. It uses SQLite as storage engine but exposes it as a high-performance Object Store, avoiding schema migrations and context bloat.

Why This Matters

Traditional relational databases and ORMs are designed for rigid schemas and remote queries, but AI agents require dynamic, low-latency access to state and context. The overhead of network latency and verbose SQL responses can make agent loops unusable, as each micro-step accumulates delays. thingd’s local-first, object-oriented approach eliminates this friction, enabling agents to operate at native speed.

Key Insights

  • ORMs cause context bloat by returning heavily structured responses, wasting tokens (Sayan Mohsin, 2026).
  • SQLite as storage engine provides local-first performance, eliminating network latency (thingd design, 2026).
  • Zero-cost abstractions in Rust allow dynamic object primitives with HashMap for flexible properties (thingd, 2026).
  • Agent loops require schema flexibility; traditional SQL migrations are a nightmare mid-execution (Sayan Mohsin, 2026).

Working Examples

Simplified representation of thingd’s dynamic object primitive in 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,
}

Practical Applications

  • Use case: AI agents storing runtime memory as entities – avoids verbose SQL responses. Pitfall: Using a remote cloud database for every micro-step adds hundreds of milliseconds of latency, making the agent feel unusable.
  • Use case: Dynamic entity storage where agents alter data shapes on the fly. Pitfall: Forcing SQL schema migrations during agent runtime causes system instability and operational nightmares.

References:

Continue reading

Next article

: Droidective Open-Source Toolkit Consolidates Mobile Debugging into One Command Palette

Related Content