Skip to main content

lawmem.ai Developer Documentation

lawmem.ai is a Memory-as-a-Service platform for legal AI agents. It gives your agents persistent semantic memory — store context, recall it by meaning, and maintain continuity across sessions.

The Problem

Most AI agents are stateless. Every session starts from zero. For legal AI agents, this creates real problems:

  • A contract review agent forgets every prior negotiation
  • A legal research agent cannot build on prior session context
  • A client intake agent has no memory of previous interactions

lawmem.ai solves this with a simple API: store text, recall it by semantic similarity, delete when done.

How It Works

  1. Your agent calls POST /store with a text payload and namespace
  2. lawmem.ai embeds the text using nomic-embed-text (768-dim vectors)
  3. Vectors are stored in Qdrant with PostgreSQL metadata, isolated by namespace
  4. Your agent calls POST /recall with a query and gets results ranked by cosine similarity
  5. Each call is metered per your plan

Key Features

  • MCP-native — plug into any MCP-compatible agent framework
  • Namespace isolation — each client or matter gets its own isolated memory space, enforcing attorney-client privilege boundaries at the infrastructure level
  • Pay-per-call or subscribe — USDC on Base via x402, or monthly subscription
  • LUKS2 encrypted at rest — AES-256, argon2id PBKDF
  • GDPR Article 28 compliant — DPA available on Legal Pro plan