Memory Layer for AI Agents

AI agents now book appointments, issue refunds, and change accounts. ContextDB remembers customers across calls, chats, and days, then checks what is current before each action.

1,000 active profiles included · No card required

  • Continuity Calls · chats · days
  • Before an action Proceed · ask · stop
  • Final control Your application decides

See it work

Friday was tentative. Thursday was confirmed.

ContextDB returns Thursday. If the agent tries to book Friday, your application asks the customer first.

quickstart.py
01 Add ContextDB ready
$ pip install pycontextdb==0.4.4
02 Open memory for one customer ready
import contextdb
db = contextdb.init(user_id="synthetic_customer_42",
    embedding_model="mock", llm_model="mock", llm_api_key="mock")
03 Save both dates, then check ready
async with db:
    wish = await db.factual.add("I might maybe come on Friday instead.",
        source="user_stated", confidence=0.4, action_relevant=True)
    confirmed = await db.factual.add("I'd like to come in Thursday afternoon.",
        source="user_stated", confidence=0.95, action_relevant=True)
    await db.factual.confirm(confirmed.id)
    trusted = await db.factual.recall_for_action("book the visit")

trusted Thursday returned. Friday withheld.

Why ContextDB

Remember the customer. Check before acting.

ContextDB carries confirmed details across conversations, then checks them before a booking, refund, or account change.

Remember what the customer already told you.

Carry preferences and confirmed details across calls, chats, and days.

Check what is current before acting.

Pause when remembered details are uncertain, stale, or conflicting.

See why the agent made its choice.

Review what it remembered and what your application did next.

Works with your stack

Keep Postgres. Add customer memory beside it.

Postgres, Supabase, and Hasura remain the source of current account, order, and inventory state. ContextDB remembers what happened across conversations and returns a decision before your host writes.

  1. Current state Postgres / Supabase / Hasura account state →
  2. Memory and decision ContextDB evidence × policy → act | ask | abstain
  3. Enforcement Customer agent host host authorization + tool policy →
  4. Mutation System of record book | refund | update

Current business truth stays in your database. Review the ownership boundary →

Start in your stack

Add the check where your agent calls tools.

Choose one maintained starter. Keep credentials and final tool execution in your host.

Get started

Check one action before it runs.

Use the docs to remember one customer detail and check it before a booking, refund, or account change.

ContextDB Cloud is hosted and currently has no availability SLA.