Kagura Memory Cloud

io.github.kagura-ai由 GitHub 账号 kagura-ai 发布v0.82.0更新于 Nov 2, 2026

Persistent memory for AI assistants: store, search, and connect knowledge across conversations.

发布方自己的服务:Memory.fit

已验证Streamable HTTP可网页运行数据库知识与记忆

概览

AI 生成的概览

远程 MCP 记忆服务,让助手跨对话存储、检索并关联知识,并可在工作区中共享。

可以做什么
  • 存储与批量存储记忆,包含摘要、内容、类型和标签
  • 以语义加关键词的混合检索查找记忆,可选重排序
  • 遍历神经记忆图谱,发现关键词检索遗漏的关联记忆
  • 按上下文与标签组织记忆,并管理文件、分析与资源
  • 管理代理状态、固定或定时投递,以及按会话回滚代理写入
  • 管理工作区、成员、用量与 API 密钥绑定
适用场景
适合需要助手在多次会话之间记住事实、决策与项目知识的场景,也适合团队在 Claude、ChatGPT、Gemini 等 MCP 客户端背后共用一层可检索的记忆。
运行要求
远程 MCP 端点,使用 Streamable HTTP,且要求 OAuth。README 另述自托管部署需 Docker、Python 3.11+、Node.js 24+、PostgreSQL、Qdrant 与 Redis,以及 OpenAI API 密钥或自托管嵌入服务;部分客户端可用 API 密钥代替 OAuth。
安装前请注意
记忆会长期保存并在工作区内共享,写入内容可能被其他成员看到。README 提醒客户端配置文件含 API 密钥,切勿提交。自托管需配置 API_KEY_SECRET、审计密钥等机密,以及可选的 OAuth 凭据。代理可写入数据,因此提供回滚工具。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Kagura Memory Cloud,将其添加到工作区。
  2. 连接 所需的 凭据。它们会被私密存储,绝不会在公开页面上展示。
  3. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/io.github.kagura-ai%2Fmemory-cloud/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。 客户端会在首次连接时完成 OAuth 登录。

{
  "mcpServers": {
    "kagura-memory-cloud": {
      "type": "http",
      "url": "https://memory.kagura-ai.com/mcp"
    }
  }
}

README

[Kagura Memory Cloud — adaptive memory for AI agents and teams, beyond RAG]

English · 日本語

Adaptive memory for AI agents and teams — self-hosted, beyond RAG.
An MCP server that gets smarter every time you search:
hybrid search + a neural memory graph that learns which memories belong together.

[License] [CI] [codecov] [Python 3.11+] [Node.js 24+] [MCP] [SafeSkill 90/100]

Works with Claude, ChatGPT, Gemini, and any MCP-compatible client.
Python SDK (KaguraClient, REST clients & FileIngestor)

[Claude Code CLI recalling from Kagura Memory over MCP]
Claude Code CLI recalling memories from Kagura over MCP — ▶ watch the demo

Why Kagura Memory Cloud?

Your AI forgets everything after each conversation. Kagura fixes that — and gets smarter every time you search.

Most AI memory tools are just vector databases with a chat wrapper. Kagura is different — it implements the full LLM Knowledge Base pattern (Karpathy's LLM Wiki) at team scale:

ApproachStorageCompoundingScale
Vector DB / RAGEmbedded chunksNone — retrieve-onlyAny
Karpathy's LLM WikiMarkdown filesLLM rewrites pagesPersonal (~100 pages)
Kagura Memory CloudPostgreSQL + Qdrant + Neural graphHebbian + Sleep MaintenanceTeam / org
FeatureDescription
Adaptive MemoryEvery search automatically strengthens connections between related memories. The more you use it, the better explore() discovers hidden relationships.
Hybrid SearchSemantic (OpenAI / self-hosted) + BM25 keyword — 96% top-1 accuracy
AI RerankingSelf-hosted (Ollama/vLLM — local, free), Voyage AI, or Cohere — cross-encoder reranking for precision
Neural Memory GraphHebbian learning builds a knowledge graph in the background. explore() traverses it for serendipitous discovery.
Agent Memory SubstrateBeyond a knowledge store: delivery modes (pinned / time-triggered), a server-stamped trust boundary, an agent state lane, and a retrieval-feedback signal — the primitives an autonomous agent loop needs.
Agent Control Plane (preview)Workspace-scoped Agent Registry, subtractive context bindings, agent-bound member keys, lifecycle kill switches, and one-call session bootstrap. Introduced in v0.49.0.
72 MCP ToolsGuide, Memory, Agent Substrate, Agent Control Plane, Neural edges, Contexts, Tags, Files (R2), Analyses (Memory Analysis), Resources, Secrets, Sleep Maintenance, Usage, API-Key Bindings
Multi-ProviderOpenAI or self-hosted (Ollama, vLLM — local, private, zero cost) for embeddings
Team ReadyWorkspaces, RBAC, context isolation, shared memory
Web UINext.js dashboard — contexts, search settings, member management
5-Minute Setup./setup.sh and you're done

Architecture

Workspace (team/org)├── Context A ("my-project")     ← like a folder│   ├── Memory 1                 ← 3-layer: summary / context / content│   ├── Memory 2│   └── Neural edges (Hebbian)   ← automatic connections├── Context B ("learning-notes")│   └── ...└── Members (Owner/Admin/Member/Viewer)

LLM Knowledge Base — 5-Layer Implementation

Karpathy's LLM Wiki pattern describes a 5-layer "living knowledge base" — beyond traditional RAG. Kagura implements all 5 layers at team scale:

LayerKagura ImplementationDifference from Karpathy's pattern
IngestREST /api/v1/memory, MCP remember, R2 file storage, resource tokens+ binary blobs, + multi-tenant
CompileMCP-as-compile-API — chat agent compiles via structured tool calls (remember(summary, content, type, tags)) + Sleep Maintenance for batch consolidationContinuous micro-compile (not batch wiki rewrite) — schema-enforced output
IndexTriple index: BM25 (keyword) + Qdrant (semantic) + Hebbian graph (relational) — all auto-maintainedNo manual index.md upkeep
QueryHybrid Search + AI Reranker + explore graph traversalBeyond markdown grep — supports semantic + relational queries
EnhanceHebbian learning — every recall() strengthens edges between co-retrieved memories. Sleep Maintenance consolidates periodically.Background graph evolution (zero LLM cost) vs LLM-driven page rewrites

Compounding loop: Currently explicit (user/agent calls remember() after synthesizing answers). Auto-write-back of synthesized answers is intentionally opt-in to keep noise low.

Adaptive Memory: Two Search Paths

Kagura separates precision search and discovery into two independent paths, each optimized for its purpose:

recall()  ──→ Hybrid Search (semantic + BM25) ──→ [Reranker] ──→ Precise results                      │                      └──→ Hebbian Learning (background) ──→ Graph edges grow                                                                │explore() ──→ Graph Traversal (Neural Memory) ←─────────────────┘  Related discoveries
  • recall() — Precision search. Hybrid (semantic 60% + BM25 40%) with optional AI reranking. Returns the most relevant memories.
  • explore() — Discovery. Traverses the Neural Memory graph to find related memories that keyword search would miss. Opt-in over MCP: ?add_tools=explore or ?profile=full on the URL lists it.
  • Hebbian learning — Every recall() silently strengthens edges between co-retrieved memories. No explicit training needed — the graph grows organically as you use the system.

This separation is intentional: mixing graph signals into recall degrades precision (validated via benchmarks). Instead, each path does what it's best at.

Data isolation: All data is filtered by workspace_id → context_id → user_id. Memories never leak across boundaries. Single Qdrant collection with payload filtering.

Tech stack: FastAPI (async) · PostgreSQL · Qdrant · Redis · Next.js 16 · OAuth2 · MCP over Streamable HTTP

Vector backend: Qdrant by default. A single-process self-hosted / CLI / edge deployment can instead run the embedded LanceDB backend — "Kagura Lite" (preview) with no separate Qdrant server (KAGURA_VECTOR_BACKEND=lance, cd backend && uv sync --locked --extra lite). Not for multi-worker / SaaS (LanceDB is single-writer). See Deployment → Embedded Vector Backend.

Quick Start

System Requirements

MinimumRecommended
CPU2 cores4+ cores
RAM4 GB8+ GB
Disk10 GB free20+ GB free

Prerequisites

  • Docker & Docker Compose
  • Python 3.11+
  • Node.js 24+
  • OpenAI API key (for embeddings) — or a self-hosted inference server (e.g. Ollama) for local embeddings
  • OAuth2 credentials (optional — password + MFA login available without OAuth)

Setup

One-line setup:

bash
git clone https://github.com/kagura-ai/memory-cloud.gitcd memory-cloud./setup.sh

With Claude Code:

bash
git clone https://github.com/kagura-ai/memory-cloud.gitcd memory-cloudclaude   # then run /setup

Step-by-step setup:

bash
# 1. Clonegit clone https://github.com/kagura-ai/memory-cloud.gitcd memory-cloud
# 2. Configure environment (generates secrets, prompts for API keys)(cd backend && python3 -m src.cli.setup_env)
# 3. Start all servicesdocker compose up -d
# 4. Run migrations(cd backend && alembic upgrade head)
# 5. Create admin account (interactive — sets password, MFA, API key, embedding provider)(cd backend && python3 -m src.cli.create_admin)
# Backend API:  http://localhost:8080# Frontend UI:  http://localhost:3000# API docs:     http://localhost:8080/redoc

.env.local settings (auto-configured by setup_env):

SettingRequiredDescription
API_KEY_SECRETYesSecret for API key encryption (auto-generated)
AUDIT_HMAC_KEY / AUDIT_PSEUDO_SALTProductionAudit-log HMAC key and erasure salt (auto-generated)
OPENAI_API_KEYYes*OpenAI API key for embeddings
SELF_HOSTED_BASE_URLNoSelf-hosted backend URL (default: http://localhost:11434)
EMBEDDING_PROVIDERNoopenai (default) or self_hosted
GOOGLE_CLIENT_ID/SECRETNoGoogle OAuth2 login (optional — password login available)
GITHUB_CLIENT_ID/SECRETNoGitHub OAuth2 login (optional)

* Either OPENAI_API_KEY or a running self-hosted inference server (e.g. Ollama) is required for memory features.

Admin CLI

CommandPurpose
python3 -m src.cli.setup_envGenerate secrets + configure .env.local (run before Docker)
python3 -m src.cli.create_adminCreate admin + workspace + API key + .mcp.json + embedding setup
python3 -m src.cli.reset_passwordReset password and/or MFA
python3 -m src.cli.delete_adminDelete admin (for re-creation)
python3 -m src.cli.transfer_context_creatorMove contexts created by one user to another (CLI admin → OAuth account, see docs/deployment.md)

Run from backend/ directory. Docker API container must be running.

Platform-specific notes
  • WSL (Windows): Install Docker Desktop for Windows and enable WSL integration
  • macOS: Install Docker Desktop for Mac. brew install [email protected] node
  • Linux (Ubuntu/Debian): sudo apt install docker.io docker-compose-v2 python3.11 nodejs npm
  • GCP (Production): Set production values in .env.local (DATABASE_URL, QDRANT_URL, ENVIRONMENT=production, CORS_ORIGINS) and private values for API_KEY_SECRET, AUDIT_HMAC_KEY, AUDIT_PSEUDO_SALT (openssl rand -hex 32) — the API refuses to start on the defaults or .env.example placeholders
  • Frontend env vars: Copy frontend/.env.example to frontend/.env.local and set:
    • NEXT_PUBLIC_API_URL — backend URL (default: http://localhost:8080)
    • NEXT_PUBLIC_APP_URL — frontend URL for metadata
    • NEXT_PUBLIC_PLAN_FREE_DISPLAY_NAME / BASIC / PRO / PROMAX — plan display name customization (default: S/M/L/XL)

Connect an MCP Client

Works with Claude Code, Claude Desktop, Claude Chat, ChatGPT, Gemini, Gemini CLI, and any Streamable-HTTP MCP client.

Claude Code (3 steps):

  1. Start services and open http://localhost:3000/workspace/integrations/credentials?tab=api-keys to create an API key
  2. Copy .mcp.json.example to .mcp.json and fill in your API key (a key created there is scoped to its workspace):
bash
cp .mcp.json.example .mcp.json# Edit .mcp.json — set the API key

.mcp.json.example ships with the all-tools URL. Set "url" to one of:

  • Core tools (default): http://localhost:8080/mcp
  • All tools: http://localhost:8080/mcp?profile=full

An OAuth client (Claude.ai, Claude Desktop, ChatGPT, Gemini, Cursor, claude mcp add) uses the same /mcp URL and connects to the workspace selected in the web UI; /mcp/w/{workspace_id} pins such a connector to one workspace when you belong to several.

The default URL lists the core memory and context tools (the exact set is under Tool Profiles) and leaves out explore, Sleep, analyses, files, edges, secrets, resources and the agent control plane — they are just not listed — describe_tools names them from inside a session, and most clients let the model call listed tools only, so a task that needs them reconnects with the URL below. Add ?profile=full when your client should see every tool schema up front (the list is about 2.7 times larger). See Tool Profiles.

  1. Restart Claude Code and verify:
You: "Remember: our API uses JWT with 1h expiry and refresh token rotation"→ AI calls remember() — stored permanently
You: "What do we know about auth?"→ AI calls recall() — finds it instantly, even months later

.mcp.json is in .gitignore — never commit it (contains API keys).

Full setup guide — every client, the memory-sync hook, the ready-to-use .claude/ templates, the kagura-memory Claude Code plugin (skills + tool-guardrail hooks), and the WSL2 networking note: MCP Client Setup

MCP Tools

72 tools across 14 categories: Guide (guide, the tool manual on demand; describe_tools, the tools the URL left out), Memory (remember / remember_batch / recall / explore …), Agent Substrate (pinned + time-triggered delivery, deterministic list / changes_since, one-call bootstrap, state, measurements, feedback), Agent Control Plane (preview), Neural Edges, Contexts, Tags, Files (R2), Analyses (Memory Analysis), Resources, Secrets (zero-knowledge), Sleep Maintenance, Usage, and API-Key Bindings — each with per-role access control.

Tool-by-tool reference with required roles: MCP Tools Reference

An agent's writes can be listed and undone: changes_since + rollback_session per session (a stateless MCP client can name its own session with _meta["ai.kagura/sessionId"] or a Kagura-Session-Id header), or — for clients without a session id — over a time window of your own writes (by_me=true, since / until); see Which clients get a session id.

A client does not have to list all 72: the default URL above lists the 21 core tools (?profile=full lists everything), ?tools=remember,recall lists exactly the tools you name, and ?add_tools=list_edges lists the core tools plus the ones you name — see Tool Profiles.

REST API

In addition to MCP tools, a full REST API is available:

  • Memory: remember, recall, reference, forget, explore (/api/v1/memory/*)
  • Contexts: CRUD, search settings (/api/v1/contexts/*)
  • Agents (preview): Registry, context bindings, and composed bootstrap (/api/v1/agents/*)
  • Files: Presigned upload/download backed by R2 (/api/v1/files/*, up to 100 MiB); legacy /api/v1/attachments/* routes return 410 Gone
  • Analyses: Memory Analysis preview/start/read/cancel (/api/v1/analyses/*)
  • Resources: External event ingestion and resource inspection (/api/v1/resources/*)
  • Workspaces: Management, members, invitations (/api/v1/workspaces/*)
  • Admin: Users, plan management, neural config (/api/v1/admin/*)
  • Secrets: Zero-knowledge secret store — ciphertext-only, server never decrypts (/api/v1/config/secrets/*)

Full API documentation: http://localhost:8080/redoc

Authentication

Two OAuth2 providers are supported:

  • Google OAuth2 — Optional. Set GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET
  • GitHub OAuth2 — Optional. Set GITHUB_CLIENT_ID and GITHUB_CLIENT_SECRET

Users with the same email address across providers share a single account. Password + MFA login is available without any OAuth provider (see Quick Start). An existing account can also add a password from its profile and then sign in with its verified email address and that password; see Deployment → Email + password sign-in.

Plan Tier Customization

Plans control per-workspace resource limits (contexts / memories / MCP calls per day). Four tiers ship by default: S (free), M (basic), L (pro) and XL (promax). For self-hosted single-user setups, assign the XL (promax) plan to your workspace — it is the only tier that may create resources, connectors and public contexts (numeric limits are env-overridable; a tier's feature set is not). Defaults, environment-variable overrides, and optional Stripe self-service billing: Deployment → Plan Tiers

Development with Claude Code

This project is designed to be developed with Claude Code and Kagura Memory Cloud itself — pre-configured slash commands, safety hooks, sub-agents, and rules load automatically from .claude/. Setup and the full tooling reference: Contributing → Development with Claude Code

Documentation

API reference — two complementary entry points:

  • Concepts (markdown): API Reference — auth, base URLs, MCP endpoint, request/response examples
  • Endpoint reference (live): http://localhost:8080/redoc — auto-generated from FastAPI, always in sync with the running backend

Concepts & guides:

Contributing

See CONTRIBUTING.md for development setup, code style, and PR workflow.

License

Apache License 2.0

来源:README.md,提交 38554bb

工具

0
该服务器需要登录,因此 SourceWeft 无法在没有账号的情况下读取其工具,也未收录。已连接账号所能看到的内容可能因账号及其权限而异。

版本历史

2
  1. v0.82.0最新Sep 28, 2026
  2. v0.77.0Sep 24, 2026

评分

已满足适用检查项的 85%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

其他 Memory 集成