Persistent legal memory
for AI agents that
can't afford to forget.
Namespace-isolated, audit-logged semantic memory exposed as a simple HTTP API.
Pay per call in USDC on Base — or a flat monthly rate through Stripe.
Designed for the standards of practice, not consumer chat.
# Recall the top 5 semantically relevant# memories for a specific matter.import httpx
r = httpx.post(
"https://api.lawmem.ai/recall",
headers={"Authorization": f"Bearer {KEY}"},
json={
"query": "NDA breach damages New York",
"matter_id": "case-2024-001",
"top_k": 5,
},
)
for hit in r.json()["results"]:
print(hit["score"], hit["text"][:80])
Why LawMem
Built for legal AI — not retrofitted from general-purpose tools.
Three properties every legal workflow needs, engineered into the data layer — not bolted on at the application layer.
Tenant isolation
Every memory operation is scoped to a single tenant ID at the query layer. Cross-tenant reads return zero results by design — enforcement happens at every read, not in policy. Combined with our tamper-evident audit chain, you have technical proof of isolation, not a promise.
Audit ready
Every store and recall is logged with timestamp, wallet, agent ID, and query. A PostgreSQL audit trail designed for e-discovery and compliance review. DPA available on request for Legal Pro customers (in preparation; timeline shared on engagement).
Semantic vector memory
Powered by nomic-embed-text — 768-dimensional cosine similarity over a dedicated Qdrant collection. Stores contracts, pleadings, depositions, and case notes as vectors, ready for natural-language recall.
Architecture
One API call, four services, zero infrastructure.
Your agent issues HTTP requests. LawMem handles embeddings, vector search, namespace enforcement, audit logging, and payment — so your agent code stays about the agent.
Quick Start
Integrate in under five minutes.
First 1,000 calls are free — no API key purchase required. After the free tier, x402 payment on Base network handles billing automatically.
# Store a memory
curl -X POST https://api.lawmem.ai/store \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"text": "Client retained firm for M&A due
diligence. Target: Acme Corp. NDA
signed 2024-01-15. Closing Q2 2024.",
"matter_id": "matter-acme-2024",
"agent_id": "due-diligence-agent",
"source_doc": "retainer_letter.pdf"
}'# Recall semantically relevant memories
curl -X POST https://api.lawmem.ai/recall \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "M&A due diligence NDA",
"matter_id": "matter-acme-2024",
"top_k": 5
}'