
Migrate Honcho Ts
Upgrade an existing Honcho TypeScript client to the current SDK when `.core`, `config`, streaming, and session-scoped APIs changed.
Overview
Migrate Honcho TS is an agent skill for the Build phase that refactors TypeScript Honcho client code to the post–`.core` SDK with session-scoped APIs and `configuration` options.
Install
npx skills add https://github.com/plastic-labs/honcho --skill migrate-honcho-tsWhat is this skill?
- Replaces removed `client.core` with `client.http` or automatic workspace handling
- Documents `Page<string>` vs array returns for `workspaces()` and `session.peers()`
- Moves `updateMessage` onto session and renames `config` to `configuration` with camelCase keys
- Covers streaming removal on `chat()` and peer/session configuration shape updates
Adoption & trust: 1 installs on skills.sh; 5k GitHub stars; 3/3 security scanners passed (skills.sh audits); trending (+100% hot-view momentum).
What problem does it solve?
Your agent still calls Honcho with `client.core`, top-level `updateMessage`, and `config` options that the new SDK removed or moved.
Who is it for?
Solo builders upgrading Honcho in an existing agent or API service with TypeScript source under version control.
Skip if: Greenfield Honcho integrations with no legacy SDK usage, or teams that only need conceptual Honcho docs without code migration.
When should I use this skill?
Upgrading the Honcho TypeScript package or fixing compile errors after Honcho API changes.
What do I get? / Deliverables
After the skill runs, call sites use `client.http` or SDK helpers, paginated list iterators, `session.updateMessage`, and `configuration` with updated streaming patterns.
- Updated Honcho client call sites aligned to the new SDK
- Passing TypeScript build after configuration and session API changes
Recommended Skills
Journey fit
SDK migration is integration work during implementation, not ideation or launch. Honcho is an external agent-memory service; this skill maps old call sites to the new HTTP/session/peer APIs.
How it compares
Use instead of reading scattered GitHub diffs when you need a ordered migration pass, not for choosing whether to adopt Honcho.
Common Questions / FAQ
Who is migrate-honcho-ts for?
Indie and solo developers maintaining TypeScript agents or backends that already depend on Honcho and must ship a compatible SDK upgrade.
When should I use migrate-honcho-ts?
Use it in the Build phase during an integrations subphase bump—when you change Honcho package versions, fix CI type errors after a major release, or align monorepo services before deploy.
Is migrate-honcho-ts safe to install?
Treat it like any third-party skill: review the Security Audits panel on this Prism page and skim generated edits before merging payment- or PII-touching memory code.
SKILL.md
READMESKILL.md - Migrate Honcho Ts
# Detailed API Changes ## Client Changes ### `.core` Property Removed The `.core` property (which exposed the raw `@honcho-ai/core` client) has been removed. Use `.http` for advanced HTTP access. ```typescript // Before const workspace = await client.core.workspaces.getOrCreate({ id: 'my-workspace' }) // After - SDK handles workspace creation automatically // For advanced usage: const response = await client.http.post('/v3/workspaces', { body: { id: 'my-workspace' } }) ``` ### Listing Methods Return Type Changes - `workspaces()` now returns `Page<string>` instead of `string[]` - `session.peers()` now returns `Peer[]` instead of `Page<Peer>` ```typescript const workspacePage = await honcho.workspaces() for (const id of workspacePage.items) { console.log(id) } ``` ### `updateMessage()` Moved to Session ```typescript // Before await honcho.updateMessage(message, { key: 'value' }, session) // After await session.updateMessage(message, { key: 'value' }) ``` ### `config` Option Renamed to `configuration` ```typescript // Before const peer = await honcho.peer('user-id', { config: { observe_me: true } }) const session = await honcho.session('session-id', { config: { ... } }) // After const peer = await honcho.peer('user-id', { configuration: { observeMe: true } }) const session = await honcho.session('session-id', { configuration: { reasoning: { enabled: true } } }) ``` --- ## Peer Changes ### Streaming API The `stream` option on `chat()` has been removed. Use `chatStream()` instead. ```typescript // Before const stream = await peer.chat('Hello', { stream: true }) for await (const chunk of stream) { process.stdout.write(chunk) } // After const stream = await peer.chatStream('Hello') for await (const chunk of stream) { process.stdout.write(chunk) } ``` Non-streaming `chat()` now only returns `string | null`: ```typescript const response = await peer.chat('Hello') // Returns string | null ``` ### New `reasoningLevel` Option ```typescript const response = await peer.chat('Complex question', { reasoningLevel: 'high' // 'minimal' | 'low' | 'medium' | 'high' | 'max' }) ``` ### `workingRep()` Renamed to `representation()` ```typescript // Before const rep = await peer.workingRep(session, target, options) console.log(rep.toString()) console.log(rep.explicit) console.log(rep.deductive) // After const rep = await peer.representation({ session, target, searchQuery: options?.searchQuery, maxConclusions: options?.maxObservations, includeMostFrequent: options?.includeMostDerived, }) console.log(rep) // Returns string directly ``` ### `getContext()` Renamed to `context()` Options are now passed as a single object: ```typescript // Before const ctx = await peer.getContext(target, options) // After const ctx = await peer.context({ target, ...options }) ``` ### `card()` Return Type Changed ```typescript // Before const card = await peer.card(target) // Returns string // After const card = await peer.card(target) // Returns string[] | null ``` ### `message()` Options Changed ```typescript // Before const msg = peer.message('Hello', { metadata: { key: 'value' }, configuration: { deriver: { enabled: true } }, created_at: '2024-01-01T00:00:00Z' }) // Returns ValidatedMessageCreate with peer_id, created_at // After const msg = peer.message('Hello', { metadata: { key: 'value' }, configuration: { reasoning: { enabled: true } }, createdAt: '2024-01-01T00:00:00Z' }) // Returns MessageInput with peerId, createdAt ``` ### `PeerContext.representation` Type Changed ```typescript // Before const ctx = await peer.getContext() if (ctx.representation) { console.log(ctx.representation.explicit) // Representation object console.log(ctx.representation.deductive) } // After const ctx = await peer.context() if (ctx.representation) { console.log(ctx.representation) // Now a string } ``` --- ## Session Changes ### `getPeers()` Return Type Changed ```typescript // Before const peers = await