Skip to main content

AI that forgets is just autocomplete. Contexara gives your agent a memory it can build on.

Project description

Contexara

AI that forgets is just autocomplete. Contexara gives your agent a memory it can build on.

Persistent, three-tier memory engine for AI agents. Drop it in and your agent remembers facts, corrections, and past sessions — automatically, across every conversation.

Install

pip install contexara
contexara setup        # configure AWS Bedrock credentials
contexara ask "what was I working on?"

Run setup on first install:

contexara setup

This guides you through AWS Bedrock credentials and saves them to ~/.contexara/.env.

How it works

Tier What it stores When
L0 — Raw turns Every user/assistant exchange verbatim Every turn
L1 — Episodes LLM-crystallized session summaries After session ends
L2 — Semantic memory Typed facts: preferences, corrections, constraints, tech choices Every turn

On session start, all three tiers inject context automatically — your agent is never blind.

Python SDK

from contexara import ContextaraClient

mem = ContextaraClient(namespace="my-agent")

ctx = mem.context()                        # inject history + last episode
facts = mem.retrieve("user preferences")  # hybrid search before answering
mem.ingest(user_text, assistant_text)     # extract + store after every turn
mem.store("User prefers bullet points", kind="style")  # explicit store
mem.checkpoint()                          # crystallize session now

MCP Server

Works with Claude Desktop and any MCP-compatible framework:

{ "mcpServers": { "contexara": { "command": "python", "args": ["-m", "contexara.mcp_server"] } } }

What's in v2.1.0

  • 9 memory kinds — profile, correction, preference, constraint, tech_preference, style, pattern, task, note
  • Zero fact-loss crystallization — 3-pass LLM pipeline with fact audit and repair
  • Hybrid search — FTS5 + cosine vector RRF on hot DB, FTS5 on cold archive
  • Never-delete versioning — full history of every memory update
  • Namespace isolation — separate memory space per agent or application
  • Model routing — fast model for chat, judge model for extraction and evals
  • ~/.contexara/ storage — persists across projects

Memory model

Tier Stores When
Raw turns Every message in the session Live
Episodes LLM-crystallized session summaries On session close
Semantic facts Extracted atomic memories Permanent
Cold archive Turns older than 30 days FTS5, auto-swept

Sessions idle for 60 minutes crystallize automatically in the background.


Interfaces

CLIask, store, search, list, chat, ingest, namespace, mcp, eval

MCP server — 13 tools over stdio or SSE. Plug into Claude Desktop or any agent SDK.

Python SDK

from contexara import ContexaraClient
client = ContexaraClient(namespace="my_agent")
client.memory.store("user prefers Python", kind="preference")
memories = client.memory.search("current goals")
client.chat.ingest(user_msg, assistant_msg)

Dashboard

contexara dashboard --port 8000

Latency charts, trace explorer, namespace management, LLM-as-judge eval scores — all in one UI.


Stack: SQLite · AWS Bedrock · Amazon Titan Embeddings · RRF hybrid retrieval · FastAPI · React

Built by Prajwal Narayan

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

contexara-2.2.0.tar.gz (1.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

contexara-2.2.0-py3-none-any.whl (1.1 MB view details)

Uploaded Python 3

File details

Details for the file contexara-2.2.0.tar.gz.

File metadata

  • Download URL: contexara-2.2.0.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for contexara-2.2.0.tar.gz
Algorithm Hash digest
SHA256 afaba0b9186ef5ed79dcda4eab6f677939dd8cbecc388c3c832a01ecd4a87bbe
MD5 2573b7e8cccff19c91ec1b9fe8cb2761
BLAKE2b-256 c02ecb9db6e9af64857abe0f1a0e8d42c8ef640a9675bc1f4575a2bf8c9e7060

See more details on using hashes here.

File details

Details for the file contexara-2.2.0-py3-none-any.whl.

File metadata

  • Download URL: contexara-2.2.0-py3-none-any.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for contexara-2.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3c991a2a14c048159954cb6d3fa44da4b74336d63cac219d41e60b7058e1394d
MD5 de8f6ccfb3619d1712b27a4779a6f00c
BLAKE2b-256 26c692bc3d14922fd55c8e3f9adbabf834a1b51e7cfc673ad9fe0d90e3664533

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page