惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

雷峰网
雷峰网
博客园 - 聂微东
酷 壳 – CoolShell
酷 壳 – CoolShell
宝玉的分享
宝玉的分享
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
罗磊的独立博客
Hugging Face - Blog
Hugging Face - Blog
T
Tailwind CSS Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
IT之家
IT之家
博客园_首页
博客园 - 三生石上(FineUI控件)
博客园 - 叶小钗
Apple Machine Learning Research
Apple Machine Learning Research
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
量子位
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
人人都是产品经理
人人都是产品经理
美团技术团队
小众软件
小众软件
Jina AI
Jina AI
S
SegmentFault 最新的问题
博客园 - Franky
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com

Hacker News - Newest: "AI"

AI can't read an investor deck AI as an attorney? Student uses ChatGPT, Gemini to sue UW over alleged racial discrimination Hacking MCP Servers in AI Systems – The Rug Pull: Tool Changes After Approval GitHub - MeepCastana/KubeezCut: Free Web based video editor Can AI judge journalism? A Thiel-backed startup says yes, even if it risks chilling whistleblowers Coming soon: 10 Things That Matter in AI Right Now DARPA built an AI to fact-check enemy weapons claims What explains heterogeneity in AI adoption? When AI Meets Muscle: Context-Aware Electrical Stimulation Promises a New Way to Guide Human Movements - Department of Computer Science AI Changed How We Build. It Did Not Change What Matters. Linux rules on using AI-generated code - Copilot is OK, but humans must take 'full responsibility for the… Meta spins up AI version of Mark Zuckerberg to engage with employees Code Mode: Let Your AI Write Programs, Not Just Call Tools | TanStack Blog GitHub - Delavalom/graft: Go framework for building AI agents. Type-safe tools, multi-provider (OpenAI, Anthropic, Gemini, Bedrock), zero vendor SDKs. India's TCS tops estimates, says new AI models did not dent services demand Gen Z's fading AI hype Strong feeling: we are in a folded AI reality GitHub - machinarii/total-recall-catalog: A reference catalog of latest knowledge retrieval, memory & RAG systems GitHub - mensfeld/code-on-incus: Give each AI agent its own isolated machine with root, Docker, and systemd. Active defense detects and stops threats automatically.. Quantization, LoRA, and the 8% Problem: Benchmarking Local LLMs for Production AI Iran war: We spoke to the man making Lego-style AI videos that experts say are powerful propaganda Powell, Bessent discussed Anthropic's Mythos AI cyber threat with major U.S. banks GitHub - immartian/bellamem: Persistent belief-graph memory for AI agents. Retrieves decisive context by importance — not recency, not RAG, not /compact. recursive-mode: The Repo-Native Operating System for AI Engineering After the attack on Sam Altman's home, will AI CEO's go on the offensive? The biggest advance in AI since the LLM Opus 4.6 vs GPT 5.4 One Prompt Unity World Generation Test “AI polls” are fake polls Client Challenge Can AI be a 'child of God'? Inside Anthropic's meeting with Christian leaders
GitHub - TjWheeler/deep-memory: A GraphRAG implementation...
tjwheeler · 2026-06-09 · via Hacker News - Newest: "AI"

@utaba/deep-memory

A vocabulary-driven graph memory library for AI agents. Give your AI structured, persistent memory that it can read, write, and traverse with zero friction.

Why Vocabulary-Driven?

AI agents working with knowledge graphs face a cold-start problem: before storing a single fact, they need to understand what entity types exist, what properties each type has, what relationship types connect them, and what constraints apply. Without this, every interaction starts with guesswork, inconsistency, and wasted tokens.

Deep-memory solves this with vocabulary governance. When an agent opens a repository, the first thing it sees is the vocabulary: a complete schema of entity types, relationship types, property definitions, and relationship constraints. This means:

  • No guesswork. The agent knows exactly what types exist and what properties to set. It can create an entity in a single tool call.
  • No inconsistency. Validation catches invalid types and missing required properties before they enter the graph. Two agents working on the same repository produce structurally consistent data.
  • No friction when extending. In open governance mode, the agent proposes a new type and it is auto-approved with deduplication. The agent never stops working to wait for approval.
  • Efficient token usage. The vocabulary is a compact schema, not thousands of example documents. An agent can internalize the full vocabulary in a few hundred tokens and then work confidently.

The result: an AI agent can go from opening a repository to creating entities and traversing relationships in seconds, with no training data, no few-shot examples, and no trial-and-error.

A note on getting started quickly

This repo has been designed to provide detailed documentation that AI can use. The AI can help guide the setup and configuration and get you started.

Pick a quickstart and paste its prompts into Claude Code:

Not a developer? Using Claude Desktop instead of Claude Code or another MCP capable AI?

Packages

Package Path Description
@utaba/deep-memory packages/core Core library — zero runtime deps, dual CJS/ESM via tsup
@utaba/deep-memory-embeddings-openai packages/embeddings-openai OpenAI-compatible embeddings provider (vLLM, OpenAI, Azure, Ollama)
@utaba/deep-memory-storage-sqlserver packages/storage-sqlserver SQL Server storage provider — persistent, multi-tenant graph storage
@utaba/deep-memory-storage-cosmosdb packages/storage-cosmosdb CosmosDB Gremlin storage + graph traversal provider
@utaba/deep-memory-storage-neo4j packages/storage-neo4j Neo4j storage + graph traversal provider (Cypher over Bolt, Community Edition)
@utaba/deep-memory-indexer packages/indexer Document indexing pipeline — LLM extraction, validation, consolidation, import
@utaba/deep-memory-indexer-llm-anthropic packages/indexer-llm-anthropic Anthropic LLM provider for indexer — prompt caching + native Messages API
@utaba/deep-memory-indexer-mcp-server packages/indexer-mcp-server Indexer MCP server — 9 phase-aware tools for the indexing pipeline
@utaba/deep-memory-local-mcp-server packages/mcp-server Local MCP server exposing deep-memory memory tools for AI agents

Deep-Memory Library

The core @utaba/deep-memory library provides a vocabulary-driven knowledge graph with typed entities, relationships, property validation, and pluggable storage/search/embedding providers. Zero runtime dependencies. The local MCP server (@utaba/deep-memory-local-mcp-server) exposes 20+ tools for AI agents to create repositories, manage entities and relationships, traverse graphs, and perform semantic search. It serves both as a reference integration and a production-ready interface for testing and working with knowledge graphs.

See docs/README.md for detailed architecture, provider setup, and API documentation.

Document Indexing Pipeline

Note: The Indexing Pipeline is optional. You can use and populate a memory graph using the AI without it. The indexing pipeline is most useful when you have documents you want to import.

The indexer packages (@utaba/deep-memory-indexer, @utaba/deep-memory-indexer-mcp-server, @utaba/deep-memory-indexer-llm-anthropic) provide an AI-driven pipeline for transforming source documents into structured knowledge graphs. The pipeline handles document analysis, multi-model LLM extraction, quality validation, cross-document entity deduplication, repository import, and embedding generation. The indexer MCP server exposes 9 phase-aware tools that guide an AI agent through the entire process — from scanning source documents to a query-ready knowledge graph.

Key features:

  • Multi-worker extraction (local + cloud models in parallel)
  • Three-tier validation (structural, LLM-verified, human-reviewed)
  • Cost tracking and estimation at every phase
  • Starter kits for common domains
  • Progressive chapter extraction for large documents
  • Prompt caching with the Anthropic provider (up to 88% savings on repeated system prompts)

See docs/README.md for the full indexing pipeline documentation, including quickstart, model selection, and troubleshooting.

Starter Kits

Starter kits are pre-built vocabularies for common domains. Each kit defines entity types, relationship types, property schemas, and an indexing process so the agent can begin populating a knowledge graph immediately.

Domain Path Purpose
Mining Equipment index-starterkits/mining/ Fleet knowledge graphs — equipment specs, components, fluids, maintenance, troubleshooting, truck-shovel matching
Council index-starterkits/council/ Local government planning — zones, land use permissibility, development standards, signage, community infrastructure
Person index-starterkits/person/ Contact networks, team directories, genealogy, biographical timelines
Conversations index-starterkits/conversations/ Long-term AI memory — interests, preferences, goals, decisions, contextual notes
Legal index-starterkits/legal/ Contract knowledge — parties, clauses, obligations, rights, definitions

Each starter kit contains:

  • README.md — Overview (purpose, use cases, governance) + manual indexing process via MCP tools
  • vocabulary.md — Entity types and relationship types with property definitions
  • domain-guidance.md — Domain-specific extraction guidance for AI agents (consumed by the automated pipeline)

To create a repository from a starter kit, tell your AI agent:

"Create a new deep memory repository using the Person starter kit."

Starter kits are extensible. In open governance mode, the agent can propose new entity and relationship types at any time.

Getting Started

Prerequisites

  • Node.js 22 or 24 (the supported LTS pair — CI tests both)
  • pnpm 9+
  • Docker and Docker Compose

1. Start the Infrastructure

The repository ships per-service Compose files so you only start what you need:

File What it brings up
docker-compose.sqlserver.yml SQL Server (persistent storage)
docker-compose.neo4j.yml Neo4j (alternative graph storage)
docker-compose.indexer.yml vLLM embeddings + extraction workers (all gated behind Compose profiles)

Start SQL Server:

# Start SQL Server (required for persistent storage)
docker compose -f docker-compose.sqlserver.yml up -d

This starts a SQL Server 2022 Developer Edition container on port 1435. The database schema is created automatically when the MCP server connects for the first time.

If you have an NVIDIA GPU and want semantic search (concept search, vocabulary deduplication via embeddings), also start the embeddings service:

# Start the vLLM embeddings server
docker compose -f docker-compose.indexer.yml --profile embeddings up -d

The vLLM service serves the Qwen3-Embedding-8B model on port 8010. This is optional — without it, deep-memory falls back to string similarity for vocabulary deduplication, and memory_search_by_concept is unavailable.

2. Install and Build

3. Create the Database

Once SQL Server is healthy, connect with your preferred SQL tool and create a database (e.g. deep-memory). The table schema is created automatically by the storage provider on first connection.

4. Configure the MCP Server

The MCP server is a local process that exposes deep-memory as Model Context Protocol tools over stdio. It is intended to run locally alongside your AI agent (Claude Code, Claude Desktop, etc.) to let the agent create and work with graph memory repositories. It also serves as a reference integration for embedding deep-memory into your own applications.

Add the following to your .mcp.json (project root or ~/.mcp.json for global):

{
  "mcpServers": {
    "deep-memory": {
      "command": "node",
      "args": ["<path-to-repo>/packages/mcp-server/dist/index.js"],
      "env": {
        "DEEP_MEMORY_ACTOR_ID": "mcp-agent",
        "DEEP_MEMORY_ACTOR_TYPE": "agent",
        "DEEP_MEMORY_STORAGE": "sqlserver",
        "DEEP_MEMORY_SQL_HOST": "localhost",
        "DEEP_MEMORY_SQL_PORT": "1435",
        "DEEP_MEMORY_SQL_DATABASE": "deep-memory",
        "DEEP_MEMORY_SQL_USER": "sa",
        "DEEP_MEMORY_SQL_PASSWORD": "DeepMem@Dev1234",
        "DEEP_MEMORY_SQL_SCHEMA": "dbo",
        "DEEP_MEMORY_SQL_TRUST_CERT": "true",
        "DEEP_MEMORY_EMBEDDINGS_BASE_URL": "http://localhost:8010",
        "DEEP_MEMORY_EMBEDDINGS_MODEL": "Qwen/Qwen3-Embedding-8B"
      }
    }
  }
}

Security Note: Consider changing the SQL Password in the config and the docker server setttings.

MCP Server Environment Variables

Variable Default Description
DEEP_MEMORY_ACTOR_ID mcp-agent Actor ID stamped on provenance metadata
DEEP_MEMORY_ACTOR_TYPE agent Actor type: agent, human, or system
DEEP_MEMORY_STORAGE memory Storage backend: memory (in-memory, data lost on restart), sqlserver, cosmosdb, or neo4j
DEEP_MEMORY_SQL_HOST SQL Server hostname
DEEP_MEMORY_SQL_PORT 1433 SQL Server port. The bundled docker-compose.sqlserver.yml publishes the container on host port 1435 (to avoid clashing with any local SQL install on the default 1433); use 1435 for that path. For a different SQL Server instance, check the port that instance is listening on.
DEEP_MEMORY_SQL_DATABASE Database name
DEEP_MEMORY_SQL_USER SQL Server username
DEEP_MEMORY_SQL_PASSWORD SQL Server password
DEEP_MEMORY_SQL_SCHEMA dbo SQL Server schema
DEEP_MEMORY_SQL_TRUST_CERT false Trust self-signed certificates (set true for local dev)
DEEP_MEMORY_NEO4J_URI Neo4j Bolt URI (when DEEP_MEMORY_STORAGE=neo4j). The bundled docker-compose.neo4j.yml exposes bolt://localhost:7687; AuraDB uses neo4j+s://<dbid>.databases.neo4j.io.
DEEP_MEMORY_NEO4J_USERNAME neo4j Neo4j username
DEEP_MEMORY_NEO4J_PASSWORD Neo4j password — DeepMem-Dev-1234 for the bundled docker-compose.neo4j.yml.
DEEP_MEMORY_NEO4J_DATABASE neo4j Neo4j database name
DEEP_MEMORY_EMBEDDINGS_BASE_URL Embeddings API URL (enables semantic search). See quickstart-embeddings.md for provider-specific recipes (vLLM, OpenAI, Ollama, Azure).
DEEP_MEMORY_EMBEDDINGS_MODEL Embeddings model identifier
DEEP_MEMORY_EMBEDDINGS_DIMENSIONS auto-detected Embedding vector dimensionality. Set only when the model supports configurable dimensions (e.g. OpenAI text-embedding-3-*).
DEEP_MEMORY_EMBEDDINGS_API_KEY API key for authenticated embeddings endpoints
DEEP_MEMORY_EXPORT_DIR ./exports Directory for exported repository archives

Note: If you omit the DEEP_MEMORY_EMBEDDINGS_* variables, the server runs without semantic search. Vocabulary deduplication falls back to Jaro-Winkler string similarity. If you omit the DEEP_MEMORY_STORAGE variable (or set it to memory), the server uses in-memory storage and all data is lost when the process stops.

5. Start Using It

Once the MCP server is configured, your AI agent has access to 20+ tools for creating repositories, managing entities and relationships, traversing the graph, and searching. The fastest way to get started is with a starter kit — tell your agent to create a repository using one of the kits above.

Architecture

┌────────────────────────────────────────────────────────────────┐
│                         DeepMemory                             │
│  (top-level facade: repository lifecycle, export/import)       │
│                                                                │
│  ┌──────────────────────────────────────────────────────────┐  │
│  │                    MemoryRepository                      │  │
│  │  (working surface for a single knowledge graph)          │  │
│  │                                                          │  │
│  │  EntityManager ─── RelationshipManager                   │  │
│  │       │                    │                              │  │
│  │       └──── VocabularyEngine ───┘                        │  │
│  │                                                          │  │
│  │  GraphTraversal ─── SearchOrchestrator                   │  │
│  └──────────────────────────────────────────────────────────┘  │
│                                                                │
│  EventBus ── ProvenanceTracker ── Portability (export/import)  │
└───────────────────────────┬────────────────────────────────────┘
                            │
             ┌──────────────┼──────────────┐
             ▼              ▼              ▼
     StorageProvider  SearchProvider  EmbeddingProvider
      (required)       (optional)      (optional)

Provider pattern: Storage is the only required provider. The SQL Server provider gives you persistent, multi-tenant graph storage. Search and embedding providers are optional — without them, you still get full CRUD, graph traversal, and string-based vocabulary deduplication.

For detailed architecture documentation, see docs/architecture.md.

Commands

pnpm install           # install all dependencies
pnpm build             # build all packages (turbo)
pnpm test              # run all tests
pnpm typecheck         # typecheck all packages
pnpm dev               # watch mode

Scope to a single package:

pnpm --filter @utaba/deep-memory test
pnpm --filter @utaba/deep-memory-local-mcp-server build

Documentation

AI Agents: For detailed guidance on using the deep-memory tools and indexing pipeline effectively, see docs/README.md. This includes architecture details, provider setup, indexing pipeline documentation, model selection guides, and troubleshooting.

Core Library:

Indexing Pipeline:

About Us

Deep Memory is built and maintained by Utaba.

A full production implementation of Deep Memory is integrated into the Universal Context Manager (UCM) — our AI productivity platform for enterprise customers.

If you are interested in working with us, please reach out:

License

Apache 2.0. See LICENSE.