honcho/sdks/typescript
doria 7b174dd34b
Ben/search rrf (#179)
* chore: fill out missing metadata inputs in python sdk

* feat: add get_peer_config to python sdk, thoroughly document ts sdk and remove bad client usage

* feat: zod
chore: update tests
chore: bump version, changelog

* chore: python sdk version bump and changelog

* [WIP] feat: combine search methods and rework endpoint to include limit param

* chore: test new stainless config with library

* nits: coderabbit

* Merge branch 'ben/sdk-improvements' into ben/search-rrf

* chore: pre-commit hooks cleanup

* feat: thoroughly document observation config

* Update sdks/python/src/honcho/peer.py

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* chore: v1.3.0

* feat: update version to 2.2.0 and enhance search functionality with arbitrary filters

- Remove unused config variables
- Added arbitrary filters to all search endpoints.
- Pluralize `filters` everywhere in SDKs for consistency
- Updated documentation and changelog to reflect these changes.

* expose core client in TS and Python SDKs (#150)

* expose core client from sdks

* align text

* fix: resolve get_effective_observe me race condition, default peer config (#176)

* fix: resolve get_effective_observe me race condition, default peer config

* fix: preserve custom config even after leaving

* chore: test cases, enqueue types

* Update sdks/typescript/package.json

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: doria <93405247+dr-frmr@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* chore: formatting

* chore: revert undesired changes to v1 spec, clean up docs, coderabbit

* feat: better search docs, fix worker.ts

* fix: correctly make ts params optional in cases, update docs

* chore: coderabbit

* chore: remove spurious package-lock

* fix: asyncify examples, use limit properly in search

* fix(tests): handle 4 return values in test_get_session_peer_configuration

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Rajat Ahuja <rahuja445@gmail.com>
2025-08-06 17:43:03 -04:00
..
__tests__ Ben/search rrf (#179) 2025-08-06 17:43:03 -04:00
examples Ben/search rrf (#179) 2025-08-06 17:43:03 -04:00
src Ben/search rrf (#179) 2025-08-06 17:43:03 -04:00
.gitignore Add Pre-commit Hooks (#165) 2025-07-22 15:17:53 -04:00
CHANGELOG.md Ben/search rrf (#179) 2025-08-06 17:43:03 -04:00
README.md Add Pre-commit Hooks (#165) 2025-07-22 15:17:53 -04:00
biome.json feat: add filter params everywhere (#164) 2025-07-21 13:40:30 -04:00
bun.lock Ben/search rrf (#179) 2025-08-06 17:43:03 -04:00
jest.config.js Add Pre-commit Hooks (#165) 2025-07-22 15:17:53 -04:00
package.json Ben/search rrf (#179) 2025-08-06 17:43:03 -04:00
tsconfig.json Ben/search rrf (#179) 2025-08-06 17:43:03 -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.