hindsight-docs

hindsight-docs

熱門

完整的 Hindsight AI 代理文件。使用此技能學習 Hindsight 架構、API、設定與最佳實務。

1.9萬星標
1141分支
更新於 2026/7/17
SKILL.md
唯讀
名稱
hindsight-docs
描述

完整的 Hindsight AI 代理文件。使用此技能學習 Hindsight 架構、API、設定與最佳實務。

Hindsight 文件技能

Hindsight 的完整技術文件——一個為 AI 代理設計的仿生記憶系統。

何時使用此技能

當你需要以下事項時,請使用此技能:

  • 了解 Hindsight 架構與核心概念
  • 學習 retain/recall/reflect 操作
  • 設定記憶庫與 disposition
  • 設定 Hindsight API 伺服器(Docker、Kubernetes、pip)
  • 整合 Python/Node.js/Rust SDK
  • 了解檢索策略(語意、BM25、圖形、時間)
  • 除錯問題或最佳化效能
  • 檢視 API 端點與參數
  • 尋找 cookbook 範例與食譜

文件結構

所有文件位於 references/,依類別組織:

references/
├── best-practices.md # 從這裡開始——任務、標籤、格式、反模式
├── faq.md            # 常見問題與決策
├── changelog/        # 版本歷史與變更(index.md + integrations/)
├── openapi.json      # 完整 OpenAPI 規格——端點架構、請求/回應模型
├── developer/
│   ├── api/          # 核心操作:retain、recall、reflect、記憶庫
│   └── *.md          # 架構、設定、部署、效能
├── sdks/
│   ├── *.md          # Python、Node.js、CLI、嵌入式
│   └── integrations/ # 框架與工具整合
└── cookbook/
    ├── recipes/      # 使用模式與範例
    └── applications/ # 完整應用程式展示

如何尋找文件

1. 依模式尋找檔案(使用 Glob 工具)

# 核心 API 操作
references/developer/api/*.md

# SDK 文件
references/sdks/*.md
references/sdks/integrations/*.md

# Cookbook 範例
references/cookbook/recipes/*.md
references/cookbook/applications/*.md

# 尋找特定主題
references/**/configuration.md
references/**/*python*.md
references/**/*deployment*.md

2. 搜尋內容(使用 Grep 工具)

# 搜尋概念
pattern: "disposition"        # 記憶庫設定
pattern: "graph retrieval"    # 圖形搜尋
pattern: "helm install"       # Kubernetes 部署
pattern: "document_id"        # 文件管理
pattern: "HINDSIGHT_API_"     # 環境變數

# 在特定區域搜尋
path: references/developer/api/
pattern: "POST /v1"           # 尋找 API 端點

path: references/cookbook/
pattern: "def |async def "    # 尋找 Python 範例

3. 閱讀完整文件(使用 Read 工具)

references/developer/api/retain.md
references/sdks/python.md
references/cookbook/recipes/per-user-memory.md

從這裡開始:最佳實務

在閱讀 API 文件之前,請先閱讀最佳實務指南。它涵蓋了任務、標籤、內容格式、觀察範圍與反模式的實用規則——這是正確整合的最快方式。

references/best-practices.md

關鍵概念

  • 記憶庫:隔離的記憶儲存區(每個使用者/代理一個)
  • Retain:儲存記憶(自動萃取事實/實體/關係)
  • Recall:檢索記憶(4 種平行策略:語意、BM25、圖形、時間)
  • Reflect:使用記憶進行 disposition 感知推理
  • document_id:將對話中的訊息分組(相同 ID 會更新)
  • Dispositions:懷疑、字面、同理心特質(1-5),影響 reflect
  • 心智模型:從事實中綜合出的知識

備註

  • 程式碼範例來自實際運作的範例
  • 設定使用 HINDSIGHT_API_* 環境變數
  • 資料庫遷移會在啟動時自動執行
  • 多庫查詢需要客戶端協調
  • 使用 document_id 進行對話演進(相同 ID = 更新)

自動產生,來自 hindsight-docs/docs/hindsight-docs/src/pages/cookbook/hindsight-docs/docs-integrations/。執行 ./scripts/generate-docs-skill.sh 以更新。