Skip to main content

Open-source memory framework for AI agents

Project description

Astrocyte

Astrocyte

Open-source memory framework for AI agents. Retain, recall, and synthesize — with pluggable backends, built-in governance, and 18 framework integrations.

PyPI Python License Docs


What is Astrocyte?

Astrocyte gives AI agents persistent memory — store what matters, retrieve what's relevant, synthesize answers from accumulated knowledge. It sits between your agents and their storage, providing:

  • Three operations: retain(), recall(), reflect() — one API for every agent and every backend
  • Pluggable backends: Tier 1 storage (pgvector, Pinecone, Qdrant, Neo4j) or Tier 2 engines (Mystique, Mem0, Zep, Letta)
  • Built-in governance: PII scanning, rate limits, token budgets, circuit breakers, access control, observability
  • 18 framework integrations: LangGraph, CrewAI, OpenAI, Claude Agent SDK, Google ADK, AutoGen, and more
  • MCP server: Any MCP-capable agent (Claude Code, Cursor, Windsurf) gets memory with zero code

Quick start

pip install astrocyte
from astrocyte import Astrocyte

brain = Astrocyte.from_config("astrocyte.yaml")

# Store a memory
await brain.retain("Calvin prefers dark mode", bank_id="user-123")

# Recall relevant memories
hits = await brain.recall("What are Calvin's preferences?", bank_id="user-123")

# Synthesize an answer from memory
result = await brain.reflect("Summarize what we know about Calvin", bank_id="user-123")

Agent framework integrations

Astrocyte works with every major agent framework through thin middleware — one integration per framework, works with every memory backend.

Framework Module
LangGraph / LangChain astrocyte.integrations.langgraph
CrewAI astrocyte.integrations.crewai
OpenAI Agents SDK astrocyte.integrations.openai_agents
Claude Agent SDK astrocyte.integrations.claude_agent_sdk
Google ADK astrocyte.integrations.google_adk
Pydantic AI astrocyte.integrations.pydantic_ai
AutoGen / AG2 astrocyte.integrations.autogen
Smolagents (HuggingFace) astrocyte.integrations.smolagents
LlamaIndex astrocyte.integrations.llamaindex
Semantic Kernel astrocyte.integrations.semantic_kernel
DSPy astrocyte.integrations.dspy
CAMEL-AI astrocyte.integrations.camel_ai
BeeAI (IBM) astrocyte.integrations.beeai
Strands Agents (AWS) astrocyte.integrations.strands
LiveKit Agents astrocyte.integrations.livekit
Haystack (deepset) astrocyte.integrations.haystack
Microsoft Agent Framework astrocyte.integrations.microsoft_agent
MCP (Claude Code, Cursor) astrocyte.mcp

MCP server

Any MCP-capable agent gets memory with zero code integration:

{
  "mcpServers": {
    "memory": {
      "command": "astrocyte-mcp",
      "args": ["--config", "astrocyte.yaml"]
    }
  }
}

Built-in governance

Neuroscience-inspired policies that protect every operation — regardless of backend:

  • PII barriers — regex, NER, or LLM-based scanning with redact/reject/warn actions
  • Rate limits & quotas — token bucket rate limiting and daily quotas per bank
  • Circuit breakers — automatic degraded mode when backends go down
  • Access control — per-bank read/write/forget/admin permissions
  • Observability — OpenTelemetry spans and Prometheus metrics on every operation
  • Data governance — classification levels, compliance profiles (GDPR, HIPAA, PDPA)

Multi-bank orchestration

Query across personal, team, and org banks with cascade, parallel, or first-match strategies:

hits = await brain.recall(
    "What are Calvin's preferences and team policies?",
    banks=["personal", "team", "org"],
    strategy="cascade",
)

Memory portability

Export and import memories between providers — no vendor lock-in:

await brain.export_bank("user-123", "./backup.ama.jsonl")
await brain.import_bank("user-123", "./backup.ama.jsonl")

Evaluation

Benchmark memory quality with built-in suites and DeepEval LLM-as-judge:

from astrocyte.eval import MemoryEvaluator

evaluator = MemoryEvaluator(brain)
results = await evaluator.run_suite("basic", bank_id="eval-bank")
print(f"Recall precision: {results.metrics.recall_precision:.2%}")

Documentation

astrocyteai.github.io/astrocyte

License

Apache 2.0 — see LICENSE.

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

astrocyte-0.1.4.tar.gz (249.4 kB view details)

Uploaded Source

Built Distribution

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

astrocyte-0.1.4-py3-none-any.whl (100.6 kB view details)

Uploaded Python 3

File details

Details for the file astrocyte-0.1.4.tar.gz.

File metadata

  • Download URL: astrocyte-0.1.4.tar.gz
  • Upload date:
  • Size: 249.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for astrocyte-0.1.4.tar.gz
Algorithm Hash digest
SHA256 ed1b81dc24eae5754a53d642270a28565ba4954071c8a4e81ea0788212c22d49
MD5 109bed5e9e3e182eaf67c7eca23a7244
BLAKE2b-256 76d935ca52604e44d2566ca68a97984833282ed48f99e7fcbaee2f9381895fec

See more details on using hashes here.

Provenance

The following attestation bundles were made for astrocyte-0.1.4.tar.gz:

Publisher: publish.yml on AstrocyteAI/astrocyte

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file astrocyte-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: astrocyte-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 100.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for astrocyte-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 dc87e91ba55ec3c6236dd52b8b3f4d7a29f9d5655ed718f85de58d3f7633a231
MD5 ab83ac14d4eb5caa0a81dfcfa742725b
BLAKE2b-256 a0a5cd626e183bc09364fdc92a5dd20a1156382aeebc16b75da7efb64860feb8

See more details on using hashes here.

Provenance

The following attestation bundles were made for astrocyte-0.1.4-py3-none-any.whl:

Publisher: publish.yml on AstrocyteAI/astrocyte

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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