Tanstack ai memory honcho

From TanStack/ai · View interactive version

Tanstack ai memory honcho is an AI agent skill from the GitHub repository TanStack/ai. 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.

How to use this skill

Skill file

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

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.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.