honcho/sdks/typescript
doria a14899521c
Honcho 2.1.0 "ROTE" deriver (#160)
* feat: update SDKs to core 1.2.0

* feat: 2.1.0 introduce ROTE deriver/dialectic
chore: refactor repo

* fix: get typescript sdk tests working again, bump version numbers

* chore: cleanup

* chore: update unit test provider config

* fix: remove "backup" query gen

* fix: remove old utils from conftest
2025-07-16 18:02:43 -04:00
..
__tests__ Honcho 2.1.0 "ROTE" deriver (#160) 2025-07-16 18:02:43 -04:00
examples Honcho 2.1.0 "ROTE" deriver (#160) 2025-07-16 18:02:43 -04:00
src Honcho 2.1.0 "ROTE" deriver (#160) 2025-07-16 18:02:43 -04:00
.gitignore feat: add new ergo sdks to monorepo (#142) 2025-06-26 17:07:23 -04:00
CHANGELOG.md Honcho 2.1.0 "ROTE" deriver (#160) 2025-07-16 18:02:43 -04:00
README.md feat: add new ergo sdks to monorepo (#142) 2025-06-26 17:07:23 -04:00
bun.lock Honcho 2.1.0 "ROTE" deriver (#160) 2025-07-16 18:02:43 -04:00
jest.config.js feat: add new ergo sdks to monorepo (#142) 2025-06-26 17:07:23 -04:00
package.json Honcho 2.1.0 "ROTE" deriver (#160) 2025-07-16 18:02:43 -04:00
tsconfig.json feat: add new ergo sdks to monorepo (#142) 2025-06-26 17:07:23 -04:00

README.md

Honcho TypeScript SDK

A high-level, ergonomic TypeScript SDK for the Honcho conversational memory platform. This library wraps honcho-node-core to provide a user-friendly, Pythonic API for managing peers, sessions, and conversational context.

Installation

npm install @honcho-ai/sdk

Usage

import { Honcho } from "@honcho-ai/sdk";

const honcho = new Honcho({
  apiKey: process.env.HONCHO_API_KEY,
  baseUrl: "http://localhost:8000",
  workspaceId: "test",
});

const assistant = honcho.peer("bob");
const alice = honcho.peer("alice");

await honcho.getPeers();

const session = honcho.session("session_1");
await session.addPeers([alice, assistant]);

await session.addMessages([
  assistant.message("What did you have for breakfast today, alice?"),
  alice.message("I had oatmeal."),
]);

const response = await alice.chat("what did alice have for breakfast today?");
console.log(response);

See examples/ for more.