Skip to content
Astrocyte mascot

Memory for every agent.

Astrocyte is an open-source framework that gives AI agents persistent memory — with pluggable backends, built-in governance, and a pipeline that works out of the box.

Get started in seconds

Install extras for your stack, open a configured Astrocyte, then either call memory from your own code or wire the same instance into an agent framework adapter — LangGraph, CrewAI, MCP, OpenAI/Claude agent SDKs, and others. Optionally add MIP (Memory Intent Protocol) to declare routing rules — Astrocyte decides which bank, tags, and compliance policies to apply, with zero routing code in your app.

pip install astrocyte astrocyte-pgvector

MIP (Memory Intent Protocol) lets you declare routing rules in mip.yaml and reference it from astrocyte.yaml with mip_config_path: ./mip.yaml. Astrocyte routes automatically — no routing code in your app.

version: "1.0"
banks:
- id: "student-{student_id}"
description: Per-student academic memory
compliance: pdpa
rules:
- name: pii-lockdown
priority: 1
override: true # compliance — intent layer cannot override
match:
pii_detected: true
action:
bank: private-encrypted
tags: [pii, compliance]
retain_policy: redact_before_store
- name: student-answer
priority: 10
match:
all:
- content_type: student_answer
- metadata.student_id: present
action:
bank: "student-{metadata.student_id}"
tags: ["{metadata.topic}"]

Three operations, any backend

Retain, recall, and reflect — with pipelines and policies that stay valid when you swap storage or engines.

Retain

Store memories with automatic chunking, entity extraction, and embedding. PII scanning and content validation happen before anything reaches your backend.

Recall

Multi-strategy retrieval — semantic, graph, keyword, temporal — fused with reciprocal rank fusion and reranked. Token budgets enforced automatically.

Reflect

Synthesize answers from memory. Native engine reflect or automatic fallback via LLM. Disposition-aware personality for support, coding, or research agents.

Harness, memory, context, LLM

Your agent stack runs the loop; Astrocyte is the governed memory boundary before context and completions. What you paste into the next turn is still your context-engineering choice — Astrocyte makes the evidence consistent and auditable. Read the architecture note →

Harness

Orchestration, tools, MCP — when to call memory and how the loop runs.

Astrocyte

Retain, recall, reflect — hybrid retrieval, policies, token budgets on the memory path.

Context

Prompt layout and snippets — your app turns hits into system/user messages for the model.

LLMs

Completions and tool calls — any provider or gateway (OpenAI, Anthropic, LiteLLM, OpenRouter, and similar).

Supports all AI agent frameworks

One memory integration for every framework. Each links to a dedicated guide with install, usage, and API reference.

Pluggable storage and engines

Bring your own database or plug in a full memory engine — Astrocyte keeps governance and observability consistent.

pgvectorPineconeQdrantNeo4jMCPLangGraphLiteLLMOpenRouterPortkeyMem0Zep

Tier 1: Retrieval backends

Use your existing databases. pgvector, Pinecone, Qdrant, Neo4j, Memgraph — the built-in pipeline handles embedding, extraction, fusion, and synthesis on top.

Tier 2: Memory engines

Full-stack engines that own the pipeline. Mystique, Mem0, Zep, Letta, Cognee — Astrocyte adds governance, observability, and portability.

Built-in governance

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

PII barriers

Regex, NER, or LLM-based scanning with country-specific patterns (SG, IN, UK, EU, AU, CA, JP, CN). Per-type actions, DLP output scanning, and compliance profiles (GDPR, HIPAA, PDPA).

Rate limits & budgets

Token bucket rate limiting, daily quotas, and per-operation token budgets. Prevent runaway agents.

Circuit breakers

Automatic degraded mode when backends go down. Empty recall, error, or cache — with controlled recovery.

Observability

OpenTelemetry spans and Prometheus metrics on every operation. Switch providers without rebuilding dashboards.

Access control

Per-bank read/write/forget/admin permissions. Principals, grants, and audit trails built in.

Data governance

Classification levels, compliance profiles (GDPR, HIPAA, PDPA), data residency, encryption, and DLP.

Agents, frameworks, models

One framework, every agent stack.

MCP Server

Any MCP-capable agent (Claude Code, Cursor, Windsurf) gets memory via astrocyte-mcp. Zero code integration.

Memory Intent Protocol (MIP)

Declarative memory routing — mechanical rules resolve deterministically, LLM judgment only when needed. One mip.yaml governs bank routing, compliance enforcement, and escalation across all agents.

Agent Frameworks

LangGraph, CrewAI, Pydantic AI, OpenAI Agents SDK, AG2 — thin middleware wires Astrocyte into each framework’s memory abstraction.

LLM Providers

Multi-provider gateways (e.g. LiteLLM, Portkey, OpenRouter, Vercel AI Gateway) or direct SDKs — OpenAI, Anthropic, Bedrock, Azure, Vertex, Ollama — or bring your own via the LLM SPI.

Memory Portability

Export and import memories between providers using Astrocyte Memory Archive (AMA), a portable newline-delimited JSON (JSONL) format. No vendor lock-in.

Explore the docs