Context7
Up-to-date docs for AI agents
作者提供的说明(英文原文)
Graph memory for AI agents: entities, cause-effect links, cross-session recall, time travel.
这三项永远不会合并成一个分数:意见、测量和人气是不同的东西。
我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。
选择你使用的 AI 应用,然后复制设置。
Authorization标为机密的值是你账户的钥匙。千万不要分享给别人,也不要粘贴到聊天里。
你需要
你用的是哪个应用?
在上方选择你的应用。我们会记住它,下次按钮会显示“安装到 …”。
这个地址需要在请求的 header 中放入密钥,而添加连接器的菜单无法设置。请改用 Claude Code、Cursor 或 VS Code。
在终端中运行这条命令
claude mcp add --transport http reasongraph https://memory.primaxiom.ai/mcp --header 'Authorization: your-value'运行前请先填写空着的值。
粘贴到项目中的 .cursor/mcp.json,或 ~/.cursor/mcp.json
{
"mcpServers": {
"reasongraph": {
"url": "https://memory.primaxiom.ai/mcp",
"headers": {
"Authorization": "your-value"
}
}
}
}浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
粘贴到项目中的 .vscode/mcp.json
{
"servers": {
"reasongraph": {
"type": "http",
"url": "https://memory.primaxiom.ai/mcp",
"headers": {
"Authorization": "your-value"
}
}
}
}浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
这个地址需要在请求的 header 中放入密钥,而添加连接器的菜单无法设置。请改用 Claude Code、Cursor 或 VS Code。
你的选择通过 Cookie 保存在这台设备上,无需账户。
Authorization 机密 必填 HTTP header这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。
我们还没有读取这个服务器的工具列表;我们会轮流检查各个端点。
我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月8日
发布者(memory.primaxiom.ai)不是仓库所有者(bgokden);可能是其他人代为上架的
我们还没有从 GitHub 读取这个仓库
我们还没有从 GitHub 读取这个仓库
尚未检查;我们会轮流检查各个端点
尚未检查;我们会轮流检查各个端点
尚未检查;我们会在检查端点时读取工具列表
与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。
它在 1 项适用的基础检查中通过了 0 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。
你需要填写:Authorization
它在作者的云端运行。通过互联网连接,无需安装,但你发送的内容会经过作者的服务器。
GitHub 仓库最后更新于–,最新版本(0.6.6)于2个月前进入注册中心。
支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。它通过 URL 连接,所以接受远程 MCP 服务器的应用也可以使用,例如开启开发者模式的 ChatGPT。
同一分类中有:Context7, Codebase Memory, Exa
同一分类中其他作者的服务器,按星标数排序。
如何看卡片:★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i
Up-to-date docs for AI agents
Codebase knowledge graph for AI agents — 162 languages, sub-ms queries, 99% fewer tokens.
Connect AI agents to Exa for web search, content fetching, and multi-step research.
按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。
A graph-based memory for AI agents: it ingests facts, auto-extracts entities and cause->effect relations, and discovers connections across independent documents *and* across agent sessions -- with conflict resolution, time-travel, causal tracing, and counterfactuals.
Standard RAG retrieves documents similar to your query. ReasonGraph is a persistent, updatable memory that discovers connections *between* facts that were written independently.
When you feed text into add_texts(), ReasonGraph automatically extracts entities (via GLiNER) and cause-effect relations (via a dedicated causal model) that become nodes and typed edges in a graph. Facts that share entities or causal chains get connected -- even if they never reference each other. Multi-hop traversal then walks these connections to build reasoning chains that span multiple sources.
On top of retrieval it works as agent memory: scopes/sessions (agents discover into each other's memory through shared entities), contradiction resolution (a new fact soft-supersedes what it contradicts), time-travel (query(as_of=...)), causal tracing (trace_effects / root_causes / causal_chain), counterfactuals (what_if), and a shippable MemoryService over HTTP and MCP.
Zero config, strong defaults. ReasonGraph() picks the best available entity extractor, causal model, embedder, and reranker automatically -- the eval numbers below come from these defaults. For the SOTA causal model (~0.70 F1) use pip install reasongraph[causal] and the graph uses it automatically. The configuration sections are optional depth, not required reading.
Claude Code / Cursor / any MCP client, hosted (EU, no LLM in the loop):
claude mcp add --transport http memory https://memory.primaxiom.ai/mcp \
--header "Authorization: Bearer rgm_YOUR_KEY"
Local MCP server (stdio, everything on your machine, SQLite):
pip install "reasongraph[service,gliner,fastembed,sqlite]"
claude mcp add memory -- reasongraph-mcp
Python, in-process:
pip install "reasongraph[all]"
from reasongraph import ReasonGraph
graph = ReasonGraph() graph.initialize_sync() graph.add_texts_sync(["TSMC is building a chip fab in Phoenix, Arizona.", "Arizona ordered water cuts for industrial users in Maricopa County."]) print(graph.discover_sync("water and chips")) # a path: water cuts -> Arizona -> TSMC fab
Any language, over HTTP (self-hosted or hosted):
curl -X POST https://memory.primaxiom.ai/sessions/notes/memory \
-H "Authorization: Bearer rgm_YOUR_KEY" -H "Content-Type: application/json" \ -d '{"text": "Apple sources M-series chips from TSMC in Arizona."}'
Ready-to-copy agents (Groq/OpenAI-compatible research agent, two agents sharing one memory, Claude Code with persistent memory, LangGraph) live in examples/agents/.
memory.primaxiom.ai runs this library as a service: sign in, get a free key (10k requests a month), remote MCP endpoint, browser console and playground. Extraction runs with small models on servers PrimAxiom operates (currently in the EU); facts are only sent to an LLM provider if you ask for a synthesized answer. Early access.
Agents that are not written in Python talk to the hosted service through a dependency-free client (clients/typescript). It uses the platform fetch, so it runs on Node 18+, Bun, Deno, Cloudflare Workers and the browser. npm install reasongraph.
import { Memory, memoryTools } from "reasongraph";
const mem = new Memory({ apiKey: process.env.REASONGRAPH_API_KEY }); await mem.remember("scout", "TSMC is building a chip fab in Phoenix, Arizona."); const facts = await mem.discover("What could disrupt the Phoenix fab?");
memoryTools(mem) returns OpenAI-style tool definitions with their executors attached, for agents that call functions directly without a framework: remember, recall and why.
pip install reasongraph[all] # everything included
Or install only what you need:
pip install reasongraph # core: in-memory backend, NER extraction, embeddings
pip install reasongraph[gliner] # + GLiNER entity extraction + hybrid causal (default, recommended) pip install reasongraph[causal] # + SOTA span-pointer causal model (~0.70 F1) + hybrid fallback pip install reasongraph[gliner2] # + GLiNER2 alternative (single model does entities + causal) pip install reasongraph[sqlite] # + SQLite backend with sqlite-vec pip install reasongraph[postgres] # + PostgreSQL + pgvector backend pip install reasongraph[service] # + HTTP + MCP memory service pip install reasongraph[fastembed] # + pure-ONNX embedder / reranker (faster cold start)
Two reports about different topics. Source A covers TSMC's semiconductor plant. Source B covers Arizona's water crisis. Neither mentions the other's subject.
import asyncio
from reasongraph import ReasonGraph
source_a = [ # Tech industry report "TSMC announced plans to build a $40 billion semiconductor fabrication plant in Phoenix, Arizona.", "The Phoenix fab requires 10 million gallons of purified water daily to cool wafers during the chip etching process.", "TSMC signed a long-term supply agreement with Apple to manufacture next-generation M-series processors at the Arizona facility.", "Construction delays at the Phoenix site pushed first production to late 2025, raising concerns among TSMC's major customers.", ]
source_b = [ # Environmental report -- never mentions TSMC, semiconductors, or chips "Arizona declared a water emergency after Lake Mead dropped to its lowest level since the 1930s, threatening water supply for millions.", "The Arizona Department of Water Resources ordered mandatory water cuts for all industrial users in Maricopa County, where Phoenix is located.", "Intel paused expansion of its Chandler, Arizona chip plant citing water availability concerns and rising operational costs.", "Apple warned investors that component shortages from its Asian and North American suppliers could impact iPhone production timelines through 2026.", ]
async def main(): async with ReasonGraph() as graph: await graph.add_texts(source_a) await graph.add_texts(source_b) results = await graph.query("How does the Arizona water crisis affect semiconductor manufacturing?") for i, text in enumerate(results, 1): source = "A" if text in source_a else "B" print(f"{i}. [Source {source}] {text}")
asyncio.run(main())
Results come from both sources. No single document contains this chain. Here is what happens under the hood:
ReasonGraph extracts entities and causal relations from each text (requires an entity+causal extractor, e.g. pip install reasongraph[gliner] or [all]):
| Text (abbreviated) | Entities | Causal relations |
|---|---|---|
| TSMC to build fab in Phoenix, Arizona... | TSMC, Phoenix, Arizona | -- |
| Phoenix fab requires 10M gallons water... | Phoenix | -- |
| TSMC supply agreement with Apple... | TSMC, Apple, Arizona | -- |
| Construction delays at Phoenix site... | TSMC, Phoenix | Construction delays -> first production |
| Arizona water emergency, Lake Mead... | Arizona, Lake Mead | Lake Mead dropped -> water emergency |
| Mandatory water cuts in Maricopa County... | Arizona Dept. of Water Resources, Phoenix, Maricopa County | -- |
| Intel paused Arizona chip plant... | Intel, Chandler, Arizona | -- |
| Apple warned of component shortages... | Apple | component shortages -> iPhone production timelines |
Three entities appear in both sources, creating bridge nodes:
| Bridge entity | Source A connections | Source B connections |
|---|---|---|
| Arizona | TSMC fab, TSMC-Apple deal | water emergency, Intel pause, water cuts |
| Phoenix | TSMC fab, water usage, delays | water cuts for industrial users |
| Apple | TSMC supply agreement | component shortage warning |
The query traversal path:
Water crisis query -> finds water-related texts from both sources via embeddings -> follows Arizona and Phoenix entity edges to discover TSMC's water-intensive fab -> follows Apple entity edge from TSMC supply agreement to Apple's component shortage warning. The causal relation Lake Mead dropped -> water emergency connects the environmental trigger to the industrial impact.
Full demo: uv run python examples/cross_source_discovery.py
from reasongraph import ReasonGraph
graph = ReasonGraph() graph.initialize_sync() graph.load_dataset_sync("financial")
results = graph.query_sync("What caused the 2008 financial crisis?") for i, text in enumerate(results, 1): print(f"{i}. {text}")
graph.close_sync()
Output -- a connected reasoning chain, not just keyword matches:
1. Lehman Brothers filed for bankruptcy in September 2008 after massive MBS losses.
import asyncio
from reasongraph import ReasonGraph
async def main(): async with ReasonGraph() as graph: await graph.load_dataset("financial") results = await graph.query("What caused the 2008 crisis?") for text in results: print(text)
asyncio.run(main())
gliner_small-v2.5 by default) and cause->effect relations (a dedicated span-pointer / hybrid causal model) are extracted on add, both on by default; falls back to GLiNER2 then BERT NER when gliner is not installedas_of), semantic dedup, and auto-forgetwhat_if只显示了开头部分;其余内容请在仓库中阅读