tanstack-ai-memory-honcho
GitHub集成Honcho托管记忆适配器,通过会话对等体交换消息实现记忆保存与综合检索。提供基于用户表示的辩证式回忆功能,替代离散片段存储,支持自定义作用域与认证配置。
Trigger Scenarios
Install
npx skills add TanStack/ai --skill tanstack-ai-memory-honcho -g -y
SKILL.md
Frontmatter
{
"name": "tanstack-ai-memory-honcho",
"description": "Use when wiring honcho() from @tanstack\/ai-memory\/honcho — a hosted memory adapter where recall is a dialectic answer over the user's representation (no discrete fragments). Requires the optional @honcho-ai\/sdk peer."
}
Honcho Memory Adapter
Hosted recall/save adapter backed by Honcho. Honcho models memory as peers
exchanging messages in a session; recall returns a synthesized dialectic answer
over the user peer's representation (so there are no discrete fragments), and save
appends the turn's messages to the session.
Setup
import { memoryMiddleware } from '@tanstack/ai-memory'
import { honcho } from '@tanstack/ai-memory/honcho'
// Build per request from the server-validated session — never from req.body.
function memoryFor(session: { userId: string; threadId: string }) {
const memory = honcho({ user: session.userId }) // baseURL defaults to HONCHO_URL
return memoryMiddleware({
adapter: memory,
scope: { threadId: session.threadId, userId: session.userId },
})
}
@honcho-ai/sdk is an optional peer dependency, loaded lazily on first use — install
it where you use honcho().
Options
user— user peer id (falls back toscope.userId, then'demo-user').baseURL— Honcho server URL (defaultHONCHO_URLorhttp://localhost:8001).workspaceId— defaultHONCHO_APP_NAMEor'ai-memory'.apiKey— defaultHONCHO_API_KEY.assistantId— assistant peer id (default'assistant').
Scope fields: session key = {tenantId|_}__{threadId}; peer id is
{tenantId}__{user} when tenantId is set, otherwise user / scope.userId.
namespace is ignored.
recall calls the user peer's dialectic chat() and injects the answer as the system
prompt; Honcho exposes no LLM tools.
Version History
-
645757a
Current 2026-09-22 03:42
修复代码示例类型检查问题,更新适配器配置文档以匹配实际API暴露选项,修正转录服务器示例及描述性文本。
- 05280a5 2026-07-30 23:52


