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

Uploaded Python 3

File details

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

File metadata

  • Download URL: contexara-2.1.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.1.0.tar.gz
Algorithm Hash digest
SHA256 a52ca10fd244ff2c5a2ba61df786a8e626d71974b6c3c295144d5c4e01a7067f
MD5 d67d30ddd7b4275bff43fcbab7f63ece
BLAKE2b-256 728d1902a9bfc3c71187c4e2074345f506cddd394d9c72ff3051f0434796ac86

See more details on using hashes here.

File details

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

File metadata

  • Download URL: contexara-2.1.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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d5bf6cbab308cfbccf7579830e26b5eb96f220b3c94182f88aa89031fc6b3e76
MD5 f14f8e95d54025e51478b6be279b6c9f
BLAKE2b-256 d333a38667a68271202607f0f787d54c90752b480bedccac86c0f8185056fe52

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