posted an update

Inspiration

We didn't start with a grand vision for AI; we started by scratching our own itch.

While building autonomous AI agents over the last few months, we hit a wall. Every time we wanted our agents to remember context across sessions, we had to send their memory to centralized cloud vector databases like Zep or Mem0.

Watching our own pipelines, we saw three massive problems:

  1. The Latency Penalty: Every single memory retrieve took around 500ms over the cloud, completely stalling the agent's prompt loop.
  2. The Cost: Running a small fleet of agents with memory cost us $25-$100/month just for hosted vector lookups.
  3. The Privacy Block: Claude's safety stack actively flagged and refused to process memory updates when we tried to send sensitive context or API keys to third-party databases.

Cloud-hosted agent memory felt like a design flaw. Latency was killing execution, cost was preventing scaling, and privacy was a blocker. We realized we needed to build a fully local alternative.


What it does

We took our battle-tested cryptographic infrastructure and expanded it. Sovseal now provides two distinct, local-first state layers:

1. The AI Context Layer (Local MCP Server)

A Model Context Protocol (MCP) server that gives your AI agents instant, local semantic memory.

  • < 10ms Latency: Embeds and recalls agent memories instantly by running the vector math entirely on your machine.
  • $0 Server Costs: Because the compute is local, there are no API keys to manage and no monthly bills to pay.
  • Safety Aligned: We engineered the prompt framework to be fully transparent, completely bypassing the safety refusals triggered by covert cloud-syncing.

2. The Human Memory Layer (Lockdrop)

Our original client-side cryptographic vault for time-locking messages and sensitive assets.

  • Mathematical Guarantees: Media is encrypted with AES-256-GCM before it ever leaves your device.
  • Decentralized Persistence: Encrypted payloads live on IPFS via Storacha, with unlock times permanently enforced by Solidity smart contracts on the Passet Hub blockchain.

How we built it

Core Engine Specs:

  • Local Embedding Pipeline: On-device vector math via @xenova/transformers (running the all-MiniLM-L6-v2 model) and @lancedb/lancedb in Node.js.
  • Smart Contract Layer: Solidity 0.8.20 compiled to PolkaVM bytecode, deployed on Passet Hub testnet via pallet-revive (0xeD0fDD2be363590800F86ec8562Dde951654668F).
  • Storage & Web Stack: Next.js 14, Web Crypto API, and Storacha Network.

Key Implementation - Local Embedding & Retrieval

To completely bypass cloud latency, we built the embedding pipeline to run locally within the Node.js runtime.

// packages/mcp-server/src/local/db.ts
import { connect } from '@lancedb/lancedb';
import { pipeline } from '@xenova/transformers';

export class LocalMemoryStore {
  private db: any;
  private embedder: any;

  async init() {
    this.db = await connect('~/.sovseal/db');
    // Load the embedding model locally into memory (80MB footprint)
    this.embedder = await pipeline('feature-extraction', 'Xenova/all-MiniLM-L6-v2');
  }

  async storeMemory(content: string, metadata: object) {
    const output = await this.embedder(content, { pooling: 'mean', normalize: true });
    const vector = Array.from(output.data);

    const table = await this.db.openTable('agent_memories');
    await table.add([{ vector, content, timestamp: Date.now(), ...metadata }]);
  }
}

Log in or sign up for Devpost to join the conversation.