mcpField
H
hindsight-docs

hindsight-docs

github.com/vectorize-ioAgent 工作流21103 次安装29 周前更新
代码仓库

关于 hindsight-docs

面向开发者和 Agent 的 Hindsight 文档技能,介绍这一 AI Agent 记忆系统。文档涵盖架构、API、SDK、部署、检索方式及实用示例。

主要功能

  1. 01架构与核心概念
  2. 02Retain、recall 和 reflect 操作
  3. 03API 与 SDK 文档
  4. 04部署和配置指南
  5. 05检索策略与示例教程

适用场景

  1. 01了解 Hindsight 记忆概念
  2. 02通过 Python、Node.js 或 Rust SDK 集成
  3. 03配置记忆库和特质参数
  4. 04排查 API 或性能问题

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/vectorize-io/hindsight-skills --skill hindsight-docs

安装后在 Claude Code 中输入/hindsight-docs确认已加载。

包含的文件

除 SKILL.md 外,安装时一起下载的参考资料和脚本。

references/
best-practices.md
references/changelog/
index.md
references/changelog/integrations/
ag2.md
ai-sdk.md
autogen.md
chat.md
claude-code.md
codex.md
crewai.md
langgraph.md
litellm.md
llamaindex.md
nemoclaw.md
openclaw.md
paperclip.md
pydantic-ai.md
strands.md
references/developer/
admin-cli.md
configuration.md
references/developer/api/
bank-templates.md
documents.md
main-methods.md
memory-banks.md
mental-models.md
operations.md
quickstart.md
recall.md
reflect.md
retain.md
webhooks.md

详细介绍

Hindsight 文档技能

Hindsight 的完整技术文档——一个面向 AI Agent 的仿生记忆系统。

何时使用此技能

在以下情况下使用此技能:

  • 了解 Hindsight 架构和核心概念
  • 学习 retain/recall/reflect 操作
  • 配置记忆库和性格倾向
  • 搭建 Hindsight API 服务(Docker、Kubernetes、pip)
  • 集成 Python/Node.js/Rust SDK
  • 了解检索策略(语义、BM25、图谱、时间)
  • 调试问题或优化性能
  • 查看 API 端点和参数
  • 查找烹饪示例和操作方法

文档结构

所有文档都位于 references/ 中,并按类别组织:

references/
├── best-practices.md # START HERE — missions, tags, formats, anti-patterns
├── faq.md            # Common questions and decisions
├── changelog/        # Release history and version changes (index.md + integrations/)
├── openapi.json      # Full OpenAPI spec — endpoint schemas, request/response models
├── developer/
│   ├── api/          # Core operations: retain, recall, reflect, memory banks
│   └── *.md          # Architecture, configuration, deployment, performance
├── sdks/
│   ├── *.md          # Python, Node.js, CLI, embedded
│   └── integrations/ # LiteLLM, AI SDK, OpenClaw, MCP, skills
└── cookbook/
    ├── recipes/      # Usage patterns and examples
    └── applications/ # Full application demos

如何查找文档

1. 按模式查找文件(使用 Glob 工具)
# Core API operations
references/developer/api/*.md

# SDK documentation
references/sdks/*.md
references/sdks/integrations/*.md

# Cookbook examples
references/cookbook/recipes/*.md
references/cookbook/applications/*.md

# Find specific topics
references/**/configuration.md
references/**/*python*.md
references/**/*deployment*.md
2. 搜索内容(使用 Grep 工具)
# Search for concepts
pattern: "disposition"        # Memory bank configuration
pattern: "graph retrieval"    # Graph-based search
pattern: "helm install"       # Kubernetes deployment
pattern: "document_id"        # Document management
pattern: "HINDSIGHT_API_"     # Environment variables

# Search in specific areas
path: references/developer/api/
pattern: "POST /v1"           # Find API endpoints

path: references/cookbook/
pattern: "def |async def "    # Find Python examples
3. 阅读完整文档(使用 Read 工具)
references/developer/api/retain.md
references/sdks/python.md
references/cookbook/recipes/per-user-memory.md

从这里开始:最佳实践

阅读 API 文档前,请先阅读最佳实践指南。该指南涵盖任务、标签、内容格式、观察范围和反模式的实用规则,是正确完成集成的最快途径。

references/best-practices.md

核心概念

  • 记忆库:彼此隔离的记忆存储(每位用户/Agent 一个)
  • 保留:存储记忆(自动提取事实/实体/关系)
  • 回忆:检索记忆(4 种并行策略:语义、BM25、图谱、时间)
  • 反思:结合性格倾向,利用记忆进行推理
  • document_id:对对话中的消息进行分组(相同 ID 时执行 upsert)
  • 性格倾向:影响 reflect 的怀疑、字面理解、共情特质(1-5)
  • 心智模型:从事实综合而成的整合知识

备注

  • 代码示例直接内嵌自可运行的示例
  • 配置使用 HINDSIGHT_API_* 环境变量
  • 数据库迁移会在启动时自动运行
  • 多记忆库查询需要客户端编排
  • 使用 document_id 推进对话(相同 ID = upsert)

自动生成,来源为 hindsight-docs/docs/。运行 ./scripts/generate-docs-skill.sh 以更新。

评论

支持 Markdown