* feat: add better params to working representation fetch in SDKs, return messages when added * fix: working representation routes now accepting all parameters properly, with tests * feat: add metadata/config fields to SDK objects where viable * fix: tests * feat: refactor SDKs to use representation config; [TEMP STAINLESS BUILD] update API * feat: add representation object to sdks * fix: use stainless sdk on branch * fix: update TypeScript SDK tsconfig to use node16 module resolution * fix: add isolatedModules = true to tsconfig * fix: lol * chore: coderabbit review * feat: make delete session real * feat: add observations routes with delete endpoints for documents. make session deletion real. * chore: type cleanup * fix: tests * chore: coderabbit review * fix: namespace by workspace * feat: add ability to customize messages_per_summary at both workspace and session level * chore: tests for summary config * chore: coderabbit cleanup * feat: make session and workspace config totally customizeable * feat: add search by peer knowledge (#250) * feat: search by peer perspective * fix: enforce workspace in filters, make messages distinct in join * fix: batch and merge migration steps * fix: add refresh, add config to workspace, add refresh function, make fields readonly * fix: search distinct * fix: merge migrations * fix: merge migrations * fix: batch deletions, improve comments, limit consolidate dream to 100 docs at a time, auth on observations routes * chore: review * chore: coderabbit * chore: review * chore: broken comment * feat: add set peer card route to API * feat: create advanced configuration parameters with message>session>workspace hierarchy * [wip] build unified testing harness * chore: lint * fix: cache invalidation, naming things, etc * feat: longmem tests * chore: peer config refactor * feat: consolidate dream working, refactor representation * fix: Various CR Comment Fixes * feat: Allow configurable Redis port for harness instances and update cleanup methods to be asynchronous. * fix: version bump, api/sdk updates * fix: observation endpoints, deletion queue, sdk observation implementation * chore: Fix migration order * fix: Use published stainless sdks * chore: (docs) update api-reference * fix: (docs) update based on api and sdk changes * fix: Code Rabbit Comments * fix: Code Rabbit Final Nits * fix: dream scheduler * fix: SDK model type consistency --------- Co-authored-by: Vineeth Voruganti <13438633+VVoruganti@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| __tests__ | ||
| examples | ||
| src | ||
| .gitignore | ||
| CHANGELOG.md | ||
| README.md | ||
| biome.json | ||
| bun.lock | ||
| dist.tar.gz | ||
| jest.config.js | ||
| package.json | ||
| tsconfig.json | ||
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.