Verified by the sovseal team

ElizaOS Agent Memory Integration

Build autonomous agent workflows with ElizaOS using the local-first, zero-knowledge sovseal adapter.

Integrate ElizaOS agents with sovseal using the official @sovseal/adapter-eliza adapter. This allows autonomous agents to maintain state continuity, store user preferences, and securely sync encrypted snapshots using write-behind replication.

By leveraging sovseal's zero-knowledge client-side encryption (AES-256-GCM), ElizaOS agents can operate with wallet funding states and permanent memories without exposing plaintext data to third-party database servers.

Installation

Add the Eliza adapter to your ElizaOS project workspace:

pnpm install @sovseal/adapter-eliza

Character Configuration

To wire the adapter into your Eliza character profile, add the eliza-plugin-mcp or direct @sovseal/adapter-eliza registration in your character JSON file:

  • File Path: characters/my-agent.character.json
{
  "name": "SovereignAgent",
  "plugins": [
    "@sovseal/adapter-eliza"
  ],
  "settings": {
    "mcp": {
      "servers": {
        "sovseal": {
          "command": "npx",
          "args": ["-y", "@sovseal/mcp-server"]
        }
      }
    },
    "secrets": {
      "SOVSEAL_API_KEY": "sov_live_your-api-key",
      "SOVSEAL_ENDPOINT": "https://ksrlmubaxzwufziwarps.supabase.co/functions/v1/v2-agent-state"
    }
  }
}

Adapter Implementation

In your Eliza agent bootstrap file, initialize and register the adapter client:

import { AgentRuntime } from "@elizaos/core";
import { SovsealAdapter } from "@sovseal/adapter-eliza";

export async function startAgent(runtime: AgentRuntime) {
  // Initialize the adapter with local database configurations
  const sovsealMemory = new SovsealAdapter({
    dbPath: "~/.sovseal/db/memories.lance",
    apiKey: runtime.getSetting("SOVSEAL_API_KEY"),
    endpoint: runtime.getSetting("SOVSEAL_ENDPOINT"),
  });

  // Wire memory actions into Eliza's hook cycle
  runtime.registerAction(sovsealMemory.actions.storeMemory);
  runtime.registerAction(sovsealMemory.actions.recallMemory);

  console.log("Sovereign memory adapter registered successfully.");
}

Dynamic State Continuity

With the adapter active, ElizaOS:

  1. Reads context at the start of any conversation room using the recall_memory action to load historical facts about the user's wallet addresses, prior questions, and preferred topics.
  2. Saves context asynchronously using the store_memory action. This runs in write-behind mode: returning immediately to prevent conversation lag, while replicates the encrypted state block to the edge in the background.

On this page