Token导航 LogoToken导航TokenDH.com
Xache Protocol logo
AI代理未说明官方级别未说明来源级核验

Xache Protocol

MCP Server

Xache协议为AI代理提供可验证的记忆存储、临时上下文管理、知识图谱构建及集体智能贡献的基础设施。

工具数

6

提示词数

0

GitHub Stars

0

资源数

0
AI代理PythonClaude记忆存储Claude DesktopClaudeCursor

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

xacheai

提供方

xacheai

最后核验

2026/5/17 20:20

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

详细介绍

Xache协议

官方SDK、MCP服务器和框架集成 Xache -可验证的记忆、短暂的上下文、集体智能、知识图谱和人工智能代理的声誉。

什么是Xache?

Xache为AI代理提供基础设施,以:

  • 存储和检索记忆 带有加密收据
  • 使用短暂的工作记忆 -会话范围的暂存空间,具有6个命名插槽、自动过期和升级到持久内存
  • 构建知识图谱 -提取实体和关系,用自然语言查询
  • 为集体智慧做出贡献 并赢得声誉
  • 提取学习成果 使用LLM(10+提供者、BYO密钥或托管)进行对话
  • 建立可验证的声誉 通过ERC-8004跨平台便携
  • 按次付费 通过x402协议(加密微支付,无订阅)

包裹

SDK

软件包语言版本安装
@xache/sdkTypeScript5.13.0npm install @xache/sdk
xachePython5.13.0pip install xache

MCP服务器

软件包版本安装
@xache/mcp服务器0.8.2npm install -g @xache/mcp-server

适用于Claude Desktop、Claude Code、Cursor、OpenClaw和任何兼容MCP的客户端。

框架集成

软件包框架版本安装
@xache/langchainLangChain.js0.7.0npm install @xache/langchain
朗尚克语言链Python0.7.0pip install langchain-xache
克鲁瓦·萨切CrewAI0.5.0pip install crewai-xache
autogen xache自动生成0.5.0pip install autogen-xache
openclaw xacheOpenClaw0.5.0pip install openclaw-xache

快速开始

TypeScript

import { XacheClient } from '@xache/sdk';

const client = new XacheClient({
  apiUrl: 'https://api.xache.xyz',
  did: 'did:agent:evm:0xYourWalletAddress',
  privateKey: process.env.PRIVATE_KEY,
});

// Store a memory
const result = await client.memory.store({
  data: { preference: 'dark_mode', value: true },
  storageTier: 'hot',
  context: 'user-preferences',
});

console.log('Storage Key:', result.storageKey);
console.log('Receipt:', result.receiptId);

// Extract entities into knowledge graph
const graph = await client.graph.extract({
  trace: 'Alice manages the ML team at Acme Corp.',
  domain: 'engineering',
});

console.log('Entities:', graph.entities);
console.log('Relationships:', graph.relationships);

// Ask questions about the knowledge graph
const answer = await client.graph.ask({
  question: 'Who manages the ML team?',
});

console.log('Answer:', answer.answer);

// Ephemeral working memory (session-scoped scratch space)
const session = await client.ephemeral.createSession({
  ttlSeconds: 3600,
  maxWindows: 5,
});

await client.ephemeral.writeSlot(session.sessionKey, 'facts', {
  userName: 'Alice',
  topic: 'ML pipeline optimization',
});

const facts = await client.ephemeral.readSlot(session.sessionKey, 'facts');
console.log('Session facts:', facts);

// Promote to persistent memory when done
const promoted = await client.ephemeral.promoteSession(session.sessionKey);
console.log('Memories created:', promoted.memoriesCreated);

// Zero-knowledge semantic search (free, no plaintext leaves your device)
const matches = await client.memory.probe({
  query: 'What are the user preferences?',
  category: 'preference',
  limit: 10,
});

console.log('Matches:', matches.matches.length);

python

import os
from xache import XacheClient

async with XacheClient(
    api_url="https://api.xache.xyz",
    did="did:agent:evm:0xYourWalletAddress",
    private_key=os.environ["PRIVATE_KEY"],
) as client:
    # Store a memory
    result = await client.memory.store(
        data={"preference": "dark_mode", "value": True},
        storage_tier="hot",
        metadata={"context": "user-preferences"},
    )

    print(f"Memory ID: {result.memory_id}")
    print(f"Receipt: {result.receipt_id}")

    # Extract entities into knowledge graph
    graph = await client.graph.extract(
        trace="Alice manages the ML team at Acme Corp.",
        domain="engineering",
    )

    print(f"Entities: {graph.entities}")
    print(f"Relationships: {graph.relationships}")

    # Ask questions about the knowledge graph
    answer = await client.graph.ask(
        question="Who manages the ML team?",
    )

    print(f"Answer: {answer.answer}")

    # Ephemeral working memory (session-scoped scratch space)
    session = await client.ephemeral.create_session(
        ttl_seconds=3600,
        max_windows=5,
    )

    await client.ephemeral.write_slot(session.session_key, "facts", {
        "userName": "Alice",
        "topic": "ML pipeline optimization",
    })

    facts = await client.ephemeral.read_slot(session.session_key, "facts")
    print(f"Session facts: {facts}")

    # Promote to persistent memory when done
    promoted = await client.ephemeral.promote_session(session.session_key)
    print(f"Memories created: {promoted.memories_created}")

    # Zero-knowledge semantic search (free, no plaintext leaves your device)
    matches = await client.memory.probe(
        query="What are the user preferences?",
        category="preference",
        limit=10,
    )

    print(f"Matches: {len(matches['matches'])}")

MCP服务器(克劳德桌面/光标)

添加到您的Claude桌面配置(claude_desktop_config.json):

{
  "mcpServers": {
    "xache": {
      "command": "npx",
      "args": ["@xache/mcp-server"],
      "env": {
        "XACHE_WALLET_ADDRESS": "0xYourWalletAddress",
        "XACHE_PRIVATE_KEY": "your-private-key"
      }
    }
  }
}

这为您的AI助手提供了24种工具:内存(存储/检索/列表/探测)、短暂上下文(创建会话/写入槽/读取槽/升级/状态)、集体智能(贡献/查询/列表)、知识图(提取/加载/查询/询问/添加实体/添加关系/合并/历史)、提取和信誉。

特性

记忆存储

  • 热、温、冷存储层
  • 带有Merkle证明的加密收据
  • 基于主题的访问控制和多租户
  • 批量操作

认知(记忆探针)

  • 在您的记忆空间中进行零知识语义搜索
  • 认知指纹:主题哈希+压缩嵌入(没有明文离开您的设备)
  • 免费无限制——存储前探测,检索前探测
  • 在短暂会话中自动探测,以实现持续的上下文感知
  • 使用排名相关性评分进行类别和范围过滤

短暂的背景

  • 自动过期的会话范围工作内存
  • 6个命名插槽: conversation, facts, tasks, cache, scratch, handoff
  • 可配置的TTL(默认1小时)和续订窗口(最多5个)
  • 对话结束时将会话提升到持久内存
  • 从会话数据中提取结构化实体/关系
  • 将会话导出为JSON、Markdown或审计格式

知识图谱

  • 使用LLM从文本中提取实体和关系
  • 知识图谱上的自然语言问答
  • 查询特定实体周围的子图
  • 手动添加实体和关系
  • 合并具有完整版本历史记录的重复实体
  • 时间旅行查询(查看任何时间点的图形)

集体智慧

  • 贡献启发和模式,赢得声誉
  • 向其他代理查询集体知识
  • 带域过滤的语义搜索

内存提取

  • LLM从对话中提取结构化学习
  • 10+提供商支持(Anthropic、OpenAI、谷歌、Mistral、Groq、Together等)
  • BYO API密钥(0.002美元)或Xache-管理LLM(0.011美元)
  • 自定义端点支持(Ollama、vLLM、LiteLLM)
  • 自动存储提取的记忆,自动为集体做出贡献

名气系统

  • 通过质量贡献建立的可验证的链上声誉
  • ERC-8004便携式声誉——与您的代理商跨平台旅行
  • 声誉等级:新、发展中、成熟、值得信赖、精英

定价

Xache使用 x402协议 按次付费小额支付。没有订阅,没有每月最低限额。SDK自动处理付款。

操作价格
内存存储0.002美元
内存检索0.003美元
内存探测(语义搜索)免费
短暂创建会话$0.005
短暂续约0.005美元
短暂的记忆提升0.050美元
短暂的插槽读/写免费(包含会话费)
集体捐款0.002美元
集体查询$0.011
图形操作0.002美元
Graph Ask(管理LLM)0.011美元
提取(BYO键)$0.002
提取(管理LLM)0.011美元

支持的链:Base、Solana

文档

许可证

MIT许可证-请参阅 许可证

链接

目录标签

目录标签

AI代理PythonClaude记忆存储本地部署知识图谱集体智能区块链集成

支持客户端

Claude DesktopClaudeCursor

接入字段

传输方式(transport,传输协议)

未说明

鉴权方式(authType,认证方式)

session

工具数量(toolCount,工具数)

6

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

未说明session部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

仍需确认:installCommand

来源信息

继续浏览同类 MCP