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.1.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.1-py3-none-any.whl (1.1 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: contexara-2.2.1.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.1.tar.gz
Algorithm Hash digest
SHA256 d3dacd1a01f8a66b32e50122fe5c7b884160905dd1220a01472bd97bb42b5c85
MD5 8c58f6d0089b5a5e3044676559f4017d
BLAKE2b-256 521e9e169f98a50f2399344f490fc8c5f156b6a10666c114541a93847d3ce149

See more details on using hashes here.

File details

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

File metadata

  • Download URL: contexara-2.2.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7b21bb89021bac8c9925993dd9eea2d0503b549d32d8a93952f11efc3475cc68
MD5 a0659edb7e2db105f9ea68de0559151d
BLAKE2b-256 15f507633ca973f179bc1efbdc232cd9ac0b28fc9caac1f19984ef1d25fc627b

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