Open-Source · Apache 2.0

Persistent memory for autonomous AI agents

Provide your agents with biological-inspired memory structures: Episodic log streams, semantic graphs, and procedural workflows. Audited with cryptographic integrity and structured with natural temporal decay.

3
Memory Types
Episodic · Semantic · Procedural
0-Config
Auto-Migration
Schema migrations on startup
Apache 2.0
Open Source
Permissive commercial use
Py + TS
Native SDKs
Framework-ready integrations
Technical Overview

System Architecture

Kyros acts as a secure mediation layer between your autonomous agents and the underlying persistent vector and graph database instances. Hover any node to inspect it.

CLIENT LAYERENGINE LAYERSTORAGE LAYERPython / TS SDKKyrosClient.remember()LLM Proxy Modeopenai base_url redirectMCP ServerStdio JSON-RPC toolsREST/HTTPinterceptstdio RPCKyros Memory EngineEpisodic LoggerEbbinghaus decay · SHA-256Semantic GraphBelief propagation · TriplesProcedural SkillsWorkflow state · Task chainsMerkle Integrity AuditorContext Injection EngineREST API · Port 8000Vector QueryGraph QueryCache R/Wpgvector / PostgreSQLDense embeddings · HNSW indexSemantic Facts StoreBelief graph · Triple storeRedis CacheContext window · TTL decay

↑ Hover any node to inspect how data flows through the system.

How It Works

Three lines of code.
Infinite memory.

Kyros slots into your existing AI stack without changing how you write agents. Add memory in minutes, not days.

STEP 01

Store a memory

Your agent captures something important — a user's name, preference, or decision. One call persists it forever.

Kyros hashes the content with SHA-256, assigns an Ebbinghaus decay weight, appends it to the Merkle audit tree, converts it to a vector embedding, and writes it to PostgreSQL — all in a single API call.

STEP 02

Recall what's relevant

Ask Kyros for context before your agent responds. It returns only the most relevant, highest-weight memories — no noise, no stale data.

HNSW approximate nearest-neighbor search finds semantically similar records. Results are reranked by cosine_similarity × retention_weight, filtered by your min_weight threshold.

STEP 03

Agent responds with context

Inject the retrieved memories into your LLM prompt. Your agent now responds as if it remembers everything — because it does.

Retrieved memories are returned as structured JSON with content, hash, weight, and tags. Inject directly into your system prompt or use our context builder helper.

Python
TypeScript
import kyros

client = kyros.Client(api_key="ky_...")

# ① Store a memory
client.ingest(
 content="User prefers Python, dark mode.",
 user_id="user_123",
 type="semantic"
)

# ② Recall relevant context
memories = client.recall(
 query="User tech preferences",
 user_id="user_123",
 top_k=3
)

# ③ Build your prompt with context
context = "\n".join(m.content for m in memories)
prompt = f"Context: {context}\n\nUser: {query}"
response = llm.complete(prompt)
kyros-py v1.x · Apache 2.0
Under the hood — every ingest() call does:
Merkle tree append for audit trail
Ebbinghaus decay weight initialized
Vector embedding for semantic search
Persisted to PostgreSQL + Redis cache
See it in action →
Interactive sandbox · No signup needed
Protocol Ready

Connect memory to Cursor, Cline, Windsurf, Antigravity, and more

Kyros ships with a built-in Model Context Protocol (MCP) server. Run a single command to register Kyros as a local workspace toolset, allowing your agentic IDE to recall context across development cycles.

CursorWindsurfClineAntigravityZedContinue
  • Zero external dependencies
  • Exposes remember, recall, and store_fact tools
  • Works via stdio JSON-RPC channels
terminal — kyros mcp
# Boot the built-in MCP server locally
$ kyros mcp start
[info] Initializing Stdio MCP host
[info] Registered tool: remember (Store episodic memories)
[info] Registered tool: recall (Semantic memory queries)
[info] Registered tool: store_fact (Record triple facts)
[ready] MCP server listening on stdio JSON-RPC
<IDE Agent connected >
[mcp] Calling tool "recall" — agent_id: cursor-env
[mcp] Found 3 matching episodic memories (Confidence: 0.96)

1-Line Framework Integrations

Kyros works with any LLM provider — OpenAI, Anthropic Claude, Google Gemini, Mistral, or local models via Ollama. Just plug in the memory layer.

OpenAIAnthropicGoogle GeminiMistralOllama (Local)
integration_setup.py
from kyros.integrations.crewai import get_kyros_tools
from crewai import Agent, Crew, Task

# Works with any LLM backend your CrewAI is configured with
# (OpenAI, Anthropic, Gemini, Mistral, Ollama, etc.)
tools = get_kyros_tools(agent_id="finance-agent")

researcher = Agent(
 role="Financial Researcher",
 goal="Investigate market trends",
 tools=tools # Memory tools auto-injected into every agent turn
)

# Kyros memory is automatically queried and stored during execution.
Proxy Mode

Intercept LLM payloads without writing code

Integrate Kyros with legacy platforms that do not support custom memory SDKs. Point your OpenAI, Gemini, or Mistral client base_url directly to the Kyros proxy endpoint. Kyros automatically queries active memory, injects context into the prompts, and hashes the turn before routing to the provider.

Standard OpenAI vs Kyros Proxy Payload

Standard Payload

{
 "model": "gpt-4",
 "messages": [
 {
 "role": "user",
 "content": "Generate review"
 }
 ]
}

Intercepted Payload

{
 "model": "gpt-4",
 "messages": [
 {
 "role": "system",
 "content": "[Memory context:
User prefers strict typing]"
 },
 {
 "role": "user",
 "content": "Generate review"
 }
 ]
}

System Specifications & Features

Every layer of Kyros is engineered for production-grade reliability, security, and extensibility.

01

Three Biological Memory Modules

Architecture

Episodic (time-ordered conversation logs), semantic (subject–predicate–object fact triples), and procedural (workflow state machines) subsystems share a unified REST API and storage backend.

02

Ebbinghaus Temporal Decay Engine

Memory Science

Memory relevance scores decay over time using configurable half-life parameters per memory type. Prevents context window bloat and keeps recalls focused on recent, high-confidence data.

03

SHA-256 Merkle Integrity Auditing

Security

Every memory write is hashed into an append-only Merkle chain. Tampering, injection attacks, and data corruption are detected instantly through root comparison and subtree validation.

04

Adaptive Belief Propagation Graph

Reasoning

When contradictory facts are stored, Kyros propagates confidence score adjustments through the semantic graph using breadth-first traversal, resolving conflicts automatically.

05

Causal Relationship Chain Tracking

Explainability

Parent–child links between memory nodes allow agents to trace the exact chain of reasoning that led to a conclusion, enabling transparent and auditable AI decision-making.

06

Zero-Code LLM Proxy Interception

Integration

Point any LLM client's base_url at the Kyros proxy endpoint. Kyros automatically intercepts the request, injects relevant memory context into the system prompt, and routes to your provider.

Up in 60 seconds

# Clone the repository
git clone https://github.com/Kyros-494/kyros-ai
cd kyros-ai

# Start the PostgreSQL + pgvector + Redis container stacks
docker compose up -d

# API server running locally on: http://localhost:8000
# Visual Dashboard: http://localhost:8000/dashboard
# Dev API Key: mk_live_default_dev_key_123456