Merge branch 'main' into vince/dev-1302
This commit is contained in:
commit
20350ce216
|
|
@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
|
|||
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
||||
and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
## [2.5.1] - 2025-12-15
|
||||
|
||||
### Fixed
|
||||
|
||||
- Backwards compatibility for `message_ids` field in documents to handle legacy tuple format
|
||||
|
||||
## [2.5.0] - 2025-12-03
|
||||
|
||||
### Added
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
---
|
||||
|
||||

|
||||

|
||||
[](https://pypi.org/project/honcho-ai/)
|
||||
[](https://npmjs.org/package/@honcho-ai/sdk)
|
||||
[](https://discord.gg/plasticlabs)
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ This guide helps you understand which versions of Honcho's API are compatible wi
|
|||
|
||||
## Version Compatibility
|
||||
|
||||
### Honcho API v2.5.0 (Current)
|
||||
### Honcho API v2.5.1 (Current)
|
||||
|
||||
<CardGroup cols={2}>
|
||||
<Card title="TypeScript SDK" icon="js">
|
||||
|
|
@ -34,7 +34,8 @@ This guide helps you understand which versions of Honcho's API are compatible wi
|
|||
|
||||
| Honcho API Version | TypeScript SDK | Python SDK |
|
||||
|-------------------|---------------|------------|
|
||||
| v2.5.0 (Current) | v1.6.0 | v1.6.0 |
|
||||
| v2.5.1 (Current) | v1.6.0 | v1.6.0 |
|
||||
| v2.5.0 | v1.6.0 | v1.6.0 |
|
||||
| v2.4.3 | v1.5.0 | v1.5.0 |
|
||||
| v2.4.2 | v1.5.0 | v1.5.0 |
|
||||
| v2.4.1 | v1.5.0 | v1.5.0 |
|
||||
|
|
|
|||
|
|
@ -27,7 +27,13 @@ Welcome to the Honcho changelog! This section documents all notable changes to t
|
|||
### Honcho API and SDK Changelogs
|
||||
<Tabs>
|
||||
<Tab title="Honcho API">
|
||||
<Update label="v2.5.0 (Current)">
|
||||
<Update label="v2.5.1 (Current)">
|
||||
### Fixed
|
||||
|
||||
- Backwards compatibility for `message_ids` field in documents to handle legacy tuple format
|
||||
</Update>
|
||||
|
||||
<Update label="v2.5.0">
|
||||
### Added
|
||||
|
||||
- Message level configurations
|
||||
|
|
|
|||
|
|
@ -2,6 +2,12 @@
|
|||
"$schema": "https://mintlify.com/docs.json",
|
||||
"theme": "mint",
|
||||
"name": "Honcho",
|
||||
"redirects": [
|
||||
{
|
||||
"source": "/",
|
||||
"destination": "/v2/documentation/introduction/overview"
|
||||
}
|
||||
],
|
||||
"colors": {
|
||||
"primary": "#66AAFF",
|
||||
"dark": "#151E27",
|
||||
|
|
@ -19,7 +25,7 @@
|
|||
"navigation": {
|
||||
"versions": [
|
||||
{
|
||||
"version": "v2.5.0",
|
||||
"version": "v2.5.1",
|
||||
"api": {
|
||||
"openapi": [
|
||||
"openapi.json"
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 135 KiB After Width: | Height: | Size: 265 KiB |
|
|
@ -1,3 +1,3 @@
|
|||
---
|
||||
openapi: post /v2/keys
|
||||
openapi: post /v2.6.0-alpha/keys
|
||||
---
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
---
|
||||
openapi: post /v2/workspaces/{workspace_id}/sessions/{session_id}/messages/
|
||||
openapi: post /v2.6.0-alpha/workspaces/{workspace_id}/sessions/{session_id}/messages/
|
||||
---
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
---
|
||||
openapi: post /v2/workspaces/{workspace_id}/sessions/{session_id}/messages/upload
|
||||
openapi: post /v2.6.0-alpha/workspaces/{workspace_id}/sessions/{session_id}/messages/upload
|
||||
---
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
---
|
||||
openapi: get /v2/workspaces/{workspace_id}/sessions/{session_id}/messages/{message_id}
|
||||
openapi: get /v2.6.0-alpha/workspaces/{workspace_id}/sessions/{session_id}/messages/{message_id}
|
||||
---
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
---
|
||||
openapi: post /v2/workspaces/{workspace_id}/sessions/{session_id}/messages/list
|
||||
openapi: post /v2.6.0-alpha/workspaces/{workspace_id}/sessions/{session_id}/messages/list
|
||||
---
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
---
|
||||
openapi: put /v2/workspaces/{workspace_id}/sessions/{session_id}/messages/{message_id}
|
||||
openapi: put /v2.6.0-alpha/workspaces/{workspace_id}/sessions/{session_id}/messages/{message_id}
|
||||
---
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
---
|
||||
openapi: post /v2/workspaces/{workspace_id}/observations
|
||||
openapi: post /v2.6.0-alpha/workspaces/{workspace_id}/observations
|
||||
---
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
---
|
||||
openapi: delete /v2/workspaces/{workspace_id}/observations/{observation_id}
|
||||
openapi: delete /v2.6.0-alpha/workspaces/{workspace_id}/observations/{observation_id}
|
||||
---
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
---
|
||||
openapi: post /v2/workspaces/{workspace_id}/observations/list
|
||||
openapi: post /v2.6.0-alpha/workspaces/{workspace_id}/observations/list
|
||||
---
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
---
|
||||
openapi: post /v2/workspaces/{workspace_id}/observations/query
|
||||
openapi: post /v2.6.0-alpha/workspaces/{workspace_id}/observations/query
|
||||
---
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
---
|
||||
openapi: post /v2/workspaces/{workspace_id}/peers/{peer_id}/chat
|
||||
openapi: post /v2.6.0-alpha/workspaces/{workspace_id}/peers/{peer_id}/chat
|
||||
---
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
---
|
||||
openapi: post /v2/workspaces/{workspace_id}/peers
|
||||
openapi: post /v2.6.0-alpha/workspaces/{workspace_id}/peers
|
||||
---
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
---
|
||||
openapi: get /v2/workspaces/{workspace_id}/peers/{peer_id}/card
|
||||
openapi: get /v2.6.0-alpha/workspaces/{workspace_id}/peers/{peer_id}/card
|
||||
---
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
---
|
||||
openapi: get /v2/workspaces/{workspace_id}/peers/{peer_id}/context
|
||||
openapi: get /v2.6.0-alpha/workspaces/{workspace_id}/peers/{peer_id}/context
|
||||
---
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
---
|
||||
openapi: post /v2/workspaces/{workspace_id}/peers/list
|
||||
openapi: post /v2.6.0-alpha/workspaces/{workspace_id}/peers/list
|
||||
---
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
---
|
||||
openapi: post /v2/workspaces/{workspace_id}/peers/{peer_id}/sessions
|
||||
openapi: post /v2.6.0-alpha/workspaces/{workspace_id}/peers/{peer_id}/sessions
|
||||
---
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
---
|
||||
openapi: post /v2/workspaces/{workspace_id}/peers/{peer_id}/representation
|
||||
openapi: post /v2.6.0-alpha/workspaces/{workspace_id}/peers/{peer_id}/representation
|
||||
---
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
---
|
||||
openapi: post /v2/workspaces/{workspace_id}/peers/{peer_id}/search
|
||||
openapi: post /v2.6.0-alpha/workspaces/{workspace_id}/peers/{peer_id}/search
|
||||
---
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
---
|
||||
openapi: put /v2/workspaces/{workspace_id}/peers/{peer_id}/card
|
||||
openapi: put /v2.6.0-alpha/workspaces/{workspace_id}/peers/{peer_id}/card
|
||||
---
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
---
|
||||
openapi: put /v2/workspaces/{workspace_id}/peers/{peer_id}
|
||||
openapi: put /v2.6.0-alpha/workspaces/{workspace_id}/peers/{peer_id}
|
||||
---
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
---
|
||||
openapi: post /v2/workspaces/{workspace_id}/sessions/{session_id}/peers
|
||||
openapi: post /v2.6.0-alpha/workspaces/{workspace_id}/sessions/{session_id}/peers
|
||||
---
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
---
|
||||
openapi: get /v2/workspaces/{workspace_id}/sessions/{session_id}/clone
|
||||
openapi: get /v2.6.0-alpha/workspaces/{workspace_id}/sessions/{session_id}/clone
|
||||
---
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
---
|
||||
openapi: delete /v2/workspaces/{workspace_id}/sessions/{session_id}
|
||||
openapi: delete /v2.6.0-alpha/workspaces/{workspace_id}/sessions/{session_id}
|
||||
---
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
---
|
||||
openapi: post /v2/workspaces/{workspace_id}/sessions
|
||||
openapi: post /v2.6.0-alpha/workspaces/{workspace_id}/sessions
|
||||
---
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
---
|
||||
openapi: get /v2/workspaces/{workspace_id}/sessions/{session_id}/peers/{peer_id}/config
|
||||
openapi: get /v2.6.0-alpha/workspaces/{workspace_id}/sessions/{session_id}/peers/{peer_id}/config
|
||||
---
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
---
|
||||
openapi: get /v2/workspaces/{workspace_id}/sessions/{session_id}/context
|
||||
openapi: get /v2.6.0-alpha/workspaces/{workspace_id}/sessions/{session_id}/context
|
||||
---
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
---
|
||||
openapi: get /v2/workspaces/{workspace_id}/sessions/{session_id}/peers
|
||||
openapi: get /v2.6.0-alpha/workspaces/{workspace_id}/sessions/{session_id}/peers
|
||||
---
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
---
|
||||
openapi: get /v2/workspaces/{workspace_id}/sessions/{session_id}/summaries
|
||||
openapi: get /v2.6.0-alpha/workspaces/{workspace_id}/sessions/{session_id}/summaries
|
||||
---
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
---
|
||||
openapi: post /v2/workspaces/{workspace_id}/sessions/list
|
||||
openapi: post /v2.6.0-alpha/workspaces/{workspace_id}/sessions/list
|
||||
---
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
---
|
||||
openapi: delete /v2/workspaces/{workspace_id}/sessions/{session_id}/peers
|
||||
openapi: delete /v2.6.0-alpha/workspaces/{workspace_id}/sessions/{session_id}/peers
|
||||
---
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
---
|
||||
openapi: post /v2/workspaces/{workspace_id}/sessions/{session_id}/search
|
||||
openapi: post /v2.6.0-alpha/workspaces/{workspace_id}/sessions/{session_id}/search
|
||||
---
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
---
|
||||
openapi: post /v2/workspaces/{workspace_id}/sessions/{session_id}/peers/{peer_id}/config
|
||||
openapi: post /v2.6.0-alpha/workspaces/{workspace_id}/sessions/{session_id}/peers/{peer_id}/config
|
||||
---
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
---
|
||||
openapi: put /v2/workspaces/{workspace_id}/sessions/{session_id}/peers
|
||||
openapi: put /v2.6.0-alpha/workspaces/{workspace_id}/sessions/{session_id}/peers
|
||||
---
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
---
|
||||
openapi: put /v2/workspaces/{workspace_id}/sessions/{session_id}
|
||||
openapi: put /v2.6.0-alpha/workspaces/{workspace_id}/sessions/{session_id}
|
||||
---
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
---
|
||||
openapi: delete /v2/workspaces/{workspace_id}/webhooks/{endpoint_id}
|
||||
openapi: delete /v2.6.0-alpha/workspaces/{workspace_id}/webhooks/{endpoint_id}
|
||||
---
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
---
|
||||
openapi: post /v2/workspaces/{workspace_id}/webhooks
|
||||
openapi: post /v2.6.0-alpha/workspaces/{workspace_id}/webhooks
|
||||
---
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
---
|
||||
openapi: get /v2/workspaces/{workspace_id}/webhooks
|
||||
openapi: get /v2.6.0-alpha/workspaces/{workspace_id}/webhooks
|
||||
---
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
---
|
||||
openapi: get /v2/workspaces/{workspace_id}/webhooks/test
|
||||
openapi: get /v2.6.0-alpha/workspaces/{workspace_id}/webhooks/test
|
||||
---
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
---
|
||||
openapi: delete /v2/workspaces/{workspace_id}
|
||||
openapi: delete /v2.6.0-alpha/workspaces/{workspace_id}
|
||||
---
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
---
|
||||
openapi: post /v2/workspaces/list
|
||||
openapi: post /v2.6.0-alpha/workspaces/list
|
||||
---
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
---
|
||||
openapi: get /v2/workspaces/{workspace_id}/deriver/status
|
||||
openapi: get /v2.6.0-alpha/workspaces/{workspace_id}/deriver/status
|
||||
---
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
---
|
||||
openapi: post /v2/workspaces
|
||||
openapi: post /v2.6.0-alpha/workspaces
|
||||
---
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
---
|
||||
openapi: post /v2/workspaces/{workspace_id}/search
|
||||
openapi: post /v2.6.0-alpha/workspaces/{workspace_id}/search
|
||||
---
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
---
|
||||
openapi: post /v2/workspaces/{workspace_id}/trigger_dream
|
||||
openapi: post /v2.6.0-alpha/workspaces/{workspace_id}/trigger_dream
|
||||
---
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
---
|
||||
openapi: put /v2/workspaces/{workspace_id}
|
||||
openapi: put /v2.6.0-alpha/workspaces/{workspace_id}
|
||||
---
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ title: 'Introduction'
|
|||
This section documents all available API endpoints in the Honcho Server. Each
|
||||
endpoint provides CRUD operations for our core primitives. For information
|
||||
about these primitives, see
|
||||
[Architecture](/v2/documentation/core-concepts/architecture).
|
||||
[Architecture](/v2.6.0-alpha/documentation/core-concepts/architecture).
|
||||
|
||||
<Warning>
|
||||
We strongly recommend using our official SDKs instead of calling these APIs directly. The SDKs provide better error handling, type safety, and developer experience.
|
||||
|
|
|
|||
|
|
@ -276,8 +276,8 @@ const client = new Honcho({
|
|||
|
||||
### Next Steps
|
||||
|
||||
- **Explore the API**: Check out the [API Reference](/v2/api-reference/introduction)
|
||||
- **Try the SDKs**: See our [guides](/v2/guides) for examples
|
||||
- **Explore the API**: Check out the [API Reference](/v2.6.0-alpha/api-reference/introduction)
|
||||
- **Try the SDKs**: See our [guides](/v2.6.0-alpha/guides) for examples
|
||||
- **Configure Honcho**: Visit the [Configuration Guide](./configuration) for detailed settings
|
||||
- **Join the community**: [Discord](https://discord.gg/plasticlabs)
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ icon: "sitemap"
|
|||
sidebarTitle: "Architecture"
|
||||
---
|
||||
|
||||
Honcho is memory infrastructure that continuously [*reasons*](/v2/documentation/core-concepts/reasoning) about data to build rich representations of peers (users, agents, or any entity) over time. This document explains the data model, system components, and how data flows through Honcho.
|
||||
Honcho is memory infrastructure that continuously [*reasons*](/v2.6.0-alpha/documentation/core-concepts/reasoning) about data to build rich representations of peers (users, agents, or any entity) over time. This document explains the data model, system components, and how data flows through Honcho.
|
||||
|
||||
## Data Model
|
||||
|
||||
|
|
@ -40,7 +40,7 @@ Authentication is scoped to the workspace level, and configuration settings can
|
|||
|
||||
### <Icon icon="user" /> Peers
|
||||
|
||||
Peers are the most important entity in Honcho--everything revolves around building and maintaining their [*representations*](/v2/documentation/core-concepts/representation). A peer represents any individual user, agent, or entity in a workspace. Treating humans and agents the same way lets you build arbitrary combinations for multi-agent or group chat scenarios.
|
||||
Peers are the most important entity in Honcho--everything revolves around building and maintaining their [*representations*](/v2.6.0-alpha/documentation/core-concepts/representation). A peer represents any individual user, agent, or entity in a workspace. Treating humans and agents the same way lets you build arbitrary combinations for multi-agent or group chat scenarios.
|
||||
|
||||
Each peer has a unique identifier within a workspace and is a container for reasoning across all their sessions. This cross-session context means conclusions drawn about a peer in one session can inform interactions in completely different sessions. Peers can be configured to control whether Honcho reasons about them.
|
||||
|
||||
|
|
@ -90,13 +90,13 @@ Honcho's architecture follows a few core principles. Everything revolves around
|
|||
<Card title="Get an API Key" icon="key" href="https://app.honcho.dev">
|
||||
Sign up for the Honcho platform and start building
|
||||
</Card>
|
||||
<Card title="Quickstart" icon="rocket" href="/v2/documentation/introduction/quickstart">
|
||||
<Card title="Quickstart" icon="rocket" href="/v2.6.0-alpha/documentation/introduction/quickstart">
|
||||
Get started with your first integration
|
||||
</Card>
|
||||
<Card title="Reasoning" icon="gears" href="/v2/documentation/core-concepts/reasoning">
|
||||
<Card title="Reasoning" icon="gears" href="/v2.6.0-alpha/documentation/core-concepts/reasoning">
|
||||
Learn how Honcho reasons about messages to build memory
|
||||
</Card>
|
||||
<Card title="Peer Representations" icon="user-magnifying-glass" href="/v2/documentation/core-concepts/representation">
|
||||
<Card title="Peer Representations" icon="user-magnifying-glass" href="/v2.6.0-alpha/documentation/core-concepts/representation">
|
||||
Understand what peer representations are and how they work
|
||||
</Card>
|
||||
</CardGroup>
|
||||
|
|
|
|||
|
|
@ -84,13 +84,13 @@ Without exhaustive reasoning, you're stuck with surface-level retrieval or someo
|
|||
<Card title="Get an API Key" icon="key" href="https://app.honcho.dev">
|
||||
Sign up for the Honcho platform and start building
|
||||
</Card>
|
||||
<Card title="Quickstart" icon="rocket" href="/v2/documentation/introduction/quickstart">
|
||||
<Card title="Quickstart" icon="rocket" href="/v2.6.0-alpha/documentation/introduction/quickstart">
|
||||
Get started with your first integration
|
||||
</Card>
|
||||
<Card title="Architecture" icon="sitemap" href="/v2/documentation/core-concepts/architecture">
|
||||
<Card title="Architecture" icon="sitemap" href="/v2.6.0-alpha/documentation/core-concepts/architecture">
|
||||
See how reasoning fits into Honcho's overall architecture
|
||||
</Card>
|
||||
<Card title="Peer Representations" icon="user-magnifying-glass" href="/v2/documentation/core-concepts/representation">
|
||||
<Card title="Peer Representations" icon="user-magnifying-glass" href="/v2.6.0-alpha/documentation/core-concepts/representation">
|
||||
Learn how reasoning produces peer representations
|
||||
</Card>
|
||||
</CardGroup>
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ When you write messages to Honcho, the reasoning models extract premises, draw c
|
|||
|
||||
## What's in a Representation?
|
||||
|
||||
A peer representation is made up of several types of artifacts that Honcho generates through [*reasoning*](/v2/documentation/core-concepts/reasoning):
|
||||
A peer representation is made up of several types of artifacts that Honcho generates through [*reasoning*](/v2.6.0-alpha/documentation/core-concepts/reasoning):
|
||||
|
||||
**Conclusions** are insights derived through formal logic. Deductive conclusions are things Honcho can be certain about based on extracted premises. Inductive conclusions identify patterns across multiple messages. Abductive conclusions infer the simplest explanations for observed behavior. For example, if a user frequently mentions work deadlines and rarely mentions hobbies, Honcho might inductively conclude they're time-constrained or career-focused.
|
||||
|
||||
|
|
@ -25,7 +25,7 @@ These enable continuous improvement. Each new message refines conclusions, updat
|
|||
|
||||
Honcho can build different representations based on what each peer observes. This enables sophisticated multi-peer scenarios where understanding is relative to what was actually witnessed.
|
||||
|
||||
There are two observation modes controlled by [configuration](/v2/documentation/features/advanced/configuration):
|
||||
There are two observation modes controlled by [configuration](/v2.6.0-alpha/documentation/features/advanced/configuration):
|
||||
|
||||
**Honcho observing peers** (`observe_me`): When enabled (default), Honcho forms a representation of the peer based on all messages they've sent across all sessions. This is Honcho's understanding of that peer, built from everything they've said and done in your system. Set `observe_me: false` if you don't want Honcho to reason about that peer at all.
|
||||
|
||||
|
|
@ -54,13 +54,13 @@ Humans reconstruct the past from imperfect recollections, then act on those reco
|
|||
<Card title="Get an API Key" icon="key" href="https://app.honcho.dev">
|
||||
Sign up for the Honcho platform and start building
|
||||
</Card>
|
||||
<Card title="Quickstart" icon="rocket" href="/v2/documentation/introduction/quickstart">
|
||||
<Card title="Quickstart" icon="rocket" href="/v2.6.0-alpha/documentation/introduction/quickstart">
|
||||
See representations in action with a working example
|
||||
</Card>
|
||||
<Card title="Architecture" icon="sitemap" href="/v2/documentation/core-concepts/architecture">
|
||||
<Card title="Architecture" icon="sitemap" href="/v2.6.0-alpha/documentation/core-concepts/architecture">
|
||||
Understand how representations fit into Honcho's architecture
|
||||
</Card>
|
||||
<Card title="Chat Endpoint" icon="comments" href="/v2/documentation/features/chat">
|
||||
<Card title="Chat Endpoint" icon="comments" href="/v2.6.0-alpha/documentation/features/chat">
|
||||
Learn how to query representations with natural language
|
||||
</Card>
|
||||
</CardGroup>
|
||||
|
|
|
|||
|
|
@ -9,12 +9,12 @@ Advanced features give you fine-grained control over Honcho's behavior and imple
|
|||
|
||||
## Configuration & Monitoring
|
||||
|
||||
- [Queue Status](/v2/documentation/features/advanced/queue-status) - Monitor background processing and reasoning tasks
|
||||
- [Configuration](/v2/documentation/features/advanced/toggle-reasoning) - Configure reasoning models and behavior
|
||||
- [Summarizer](/v2/documentation/features/advanced/summarizer) - Automatic session summarization
|
||||
- [Queue Status](/v2.6.0-alpha/documentation/features/advanced/queue-status) - Monitor background processing and reasoning tasks
|
||||
- [Configuration](/v2.6.0-alpha/documentation/features/advanced/toggle-reasoning) - Configure reasoning models and behavior
|
||||
- [Summarizer](/v2.6.0-alpha/documentation/features/advanced/summarizer) - Automatic session summarization
|
||||
|
||||
## Querying & Filtering
|
||||
|
||||
- [Search](/v2/documentation/features/advanced/search) - Search across peers, sessions, and messages
|
||||
- [Filters](/v2/documentation/features/advanced/using-filters) - Filter queries with advanced parameters
|
||||
- [Streaming Responses](/v2/documentation/features/advanced/streaming-response) - Stream dialectic responses in real-time
|
||||
- [Search](/v2.6.0-alpha/documentation/features/advanced/search) - Search across peers, sessions, and messages
|
||||
- [Filters](/v2.6.0-alpha/documentation/features/advanced/using-filters) - Filter queries with advanced parameters
|
||||
- [Streaming Responses](/v2.6.0-alpha/documentation/features/advanced/streaming-response) - Stream dialectic responses in real-time
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ description: Learn how to check the status of Honcho's reasoning
|
|||
icon: "lines-leaning"
|
||||
---
|
||||
|
||||
Whenever messages are stored in Honcho, a background process kicks off to [reason](/v2/documentation/core-concepts/reasoning) about the conversation and generate insights.
|
||||
Whenever messages are stored in Honcho, a background process kicks off to [reason](/v2.6.0-alpha/documentation/core-concepts/reasoning) about the conversation and generate insights.
|
||||
|
||||
Reasoning is an asynchronous process and, depending on load, may not immediately
|
||||
generate insights for the latest message you've sent. To help with this, Honcho
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ You may therefore disable observation of a peer by setting the `observe_me` flag
|
|||
If the peer has a session-level configuration, it will override this configuration. If the flag is not set, or is set to `true`, the peer will be observed.
|
||||
|
||||
<Info>
|
||||
For session-level observation controls and local representations (where peers build separate models of each other), see [Representation Scopes](/v2/documentation/features/advanced/representation-scopes).
|
||||
For session-level observation controls and local representations (where peers build separate models of each other), see [Representation Scopes](/v2.6.0-alpha/documentation/features/advanced/representation-scopes).
|
||||
</Info>
|
||||
|
||||
<CodeGroup>
|
||||
|
|
|
|||
|
|
@ -172,7 +172,7 @@ When you call `peer.chat(query)`:
|
|||
3. Combines them with segments of source messages, if needed, to gather more context
|
||||
4. Synthesizes them into a coherent natural language response to your query
|
||||
|
||||
Honcho [reasoning](/v2/documentation/core-concepts/reasoning) runs continuously in the background, processing new messages and updating representations. The chat endpoint always has access to Honcho's latest conclusions about the peer.
|
||||
Honcho [reasoning](/v2.6.0-alpha/documentation/core-concepts/reasoning) runs continuously in the background, processing new messages and updating representations. The chat endpoint always has access to Honcho's latest conclusions about the peer.
|
||||
|
||||
## Best Practices
|
||||
|
||||
|
|
@ -188,4 +188,4 @@ Don't just use chat for LLM prompts - use it to drive application logic, routing
|
|||
### Combine with get_context()
|
||||
Use `get_context()` for conversation context and `peer.chat()` for specific insights. They complement each other.
|
||||
|
||||
For more ideas on using the chat endpoint, see our [guides](/v2/guides/overview).
|
||||
For more ideas on using the chat endpoint, see our [guides](/v2.6.0-alpha/guides/overview).
|
||||
|
|
|
|||
|
|
@ -6,8 +6,11 @@ icon: 'messages'
|
|||
|
||||
The `get_context()` method is a powerful feature that retrieves formatted conversation context from sessions, making it easy to integrate with LLMs like OpenAI, Anthropic, and others. This guide covers everything you need to know about working with session context.
|
||||
|
||||
<Note>
|
||||
By default, the context includes a blend of summary and messages ***which covers the entire session history of a peer***.
|
||||
</Note>
|
||||
|
||||
By default, the context includes a blend of summary and messages which covers the entire history of the session. Summaries are automatically generated at intervals and recent messages are included depending on how many tokens the context is intended to be. You can specify any token limit you want, and can disable summaries to fill that limit entirely with recent messages. To get representation data, you need to specify a target peer.
|
||||
Summaries are automatically generated at intervals and recent messages are included depending on how many tokens the context is intended to be. You can specify any token limit you want, and can disable summaries to fill that limit entirely with recent messages. To get representation data, you need to specify a target peer.
|
||||
|
||||
## Basic Usage
|
||||
|
||||
|
|
@ -96,7 +99,7 @@ context = session.get_context(summary=False, tokens=2000)
|
|||
|
||||
### Peer Representation in Context
|
||||
|
||||
You can include a peer's [representation](/v2/documentation/core-concepts/representation) and peer card in the context by specifying `peer_target`. This is useful for providing the LLM with knowledge about a specific peer.
|
||||
You can include a peer's [representation](/v2.6.0-alpha/documentation/core-concepts/representation) and peer card in the context by specifying `peer_target`. This is useful for providing the LLM with knowledge about a specific peer.
|
||||
|
||||
<CodeGroup>
|
||||
```python Python
|
||||
|
|
@ -601,40 +604,24 @@ anthropic_messages = context.to_anthropic(assistant=assistant)
|
|||
|
||||
### 3. Error Handling
|
||||
|
||||
Always handle potential errors when working with context:
|
||||
Always handle potential errors when retrieving context:
|
||||
|
||||
<CodeGroup>
|
||||
```python Python
|
||||
try:
|
||||
context = session.get_context(tokens=2000)
|
||||
messages = context.to_openai(assistant=assistant)
|
||||
|
||||
# Use messages with LLM API
|
||||
response = openai_client.chat.completions.create(
|
||||
model="gpt-4",
|
||||
messages=messages
|
||||
)
|
||||
|
||||
except Exception as e:
|
||||
print(f"Error getting context: {e}")
|
||||
# Handle error appropriately
|
||||
# Handle error appropriately (fallback to basic context, retry, etc.)
|
||||
```
|
||||
|
||||
```typescript TypeScript
|
||||
(async () => {
|
||||
try {
|
||||
const context = await session.getContext({ tokens: 2000 });
|
||||
const messages = context.toOpenAI(assistant);
|
||||
|
||||
// Use messages with LLM API
|
||||
const response = await openai.chat.completions.create({
|
||||
model: "gpt-4",
|
||||
messages: messages
|
||||
});
|
||||
|
||||
} catch (error) {
|
||||
console.error(`Error getting context: ${error}`);
|
||||
// Handle error appropriately
|
||||
// Handle error appropriately (fallback to basic context, retry, etc.)
|
||||
}
|
||||
})();
|
||||
```
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ Honcho is an open source memory library with a managed service for building stat
|
|||
<Card title="Get an API Key" icon="key" href="https://app.honcho.dev">
|
||||
Sign up and start building with Honcho
|
||||
</Card>
|
||||
<Card title="Quickstart" icon="rocket" href="/v2/documentation/introduction/quickstart">
|
||||
<Card title="Quickstart" icon="rocket" href="/v2.6.0-alpha/documentation/introduction/quickstart">
|
||||
Build your first stateful agent in minutes
|
||||
</Card>
|
||||
</CardGroup>
|
||||
|
|
@ -63,7 +63,7 @@ Honcho has four storage primitives that work together:
|
|||
- **Sessions** - Interaction threads between peers with temporal boundaries
|
||||
- **Messages** - Units of data that trigger reasoning (conversations, events, activity, documents, and more)
|
||||
|
||||
When you write messages to Honcho, they're stored and processed in the background. Custom reasoning models perform formal logical [*reasoning*](/v2/documentation/core-concepts/reasoning) to generate conclusions about each peer. These conclusions are stored as [*representations*](/v2/documentation/core-concepts/representation) that you can query to provide rich context for your agents.
|
||||
When you write messages to Honcho, they're stored and processed in the background. Custom reasoning models perform formal logical [*reasoning*](/v2.6.0-alpha/documentation/core-concepts/reasoning) to generate conclusions about each peer. These conclusions are stored as [*representations*](/v2.6.0-alpha/documentation/core-concepts/representation) that you can query to provide rich context for your agents.
|
||||
|
||||

|
||||
|
||||
|
|
@ -87,13 +87,13 @@ Welcome to Honcho. We're excited to have you at the frontier of AI with us 🫡.
|
|||
<Card title="Get an API Key" icon="key" href="https://app.honcho.dev">
|
||||
Sign up for the Honcho platform and get your API key
|
||||
</Card>
|
||||
<Card title="Quickstart" icon="rocket" href="/v2/documentation/introduction/quickstart">
|
||||
<Card title="Quickstart" icon="rocket" href="/v2.6.0-alpha/documentation/introduction/quickstart">
|
||||
Build your first stateful agent in minutes
|
||||
</Card>
|
||||
<Card title="Architecture" icon="sitemap" href="/v2/documentation/core-concepts/architecture">
|
||||
<Card title="Architecture" icon="sitemap" href="/v2.6.0-alpha/documentation/core-concepts/architecture">
|
||||
Deep dive into how Honcho's primitives fit together
|
||||
</Card>
|
||||
<Card title="Reasoning" icon="gears" href="/v2/documentation/core-concepts/reasoning">
|
||||
<Card title="Reasoning" icon="gears" href="/v2.6.0-alpha/documentation/core-concepts/reasoning">
|
||||
Learn how Honcho reasons about data to build memory
|
||||
</Card>
|
||||
</CardGroup>
|
||||
|
|
|
|||
|
|
@ -230,7 +230,7 @@ user.chat("What should I know about this user? 3 sentences max").then((response)
|
|||
</CodeGroup>
|
||||
|
||||
<Tip>
|
||||
Honcho needs a short amount of time to process messages you write to it. There are several utilities to [check the status](/v2/documentation/features/advanced/queue-status) of the queue. Honcho also offers numerous ways to query reasoning to fit latency needs: see the [Get Context](/v2/documentation/features/get-context) page.
|
||||
Honcho needs a short amount of time to process messages you write to it. There are several utilities to [check the status](/v2.6.0-alpha/documentation/features/advanced/queue-status) of the queue. Honcho also offers numerous ways to query reasoning to fit latency needs: see the [Get Context](/v2.6.0-alpha/documentation/features/get-context) page.
|
||||
</Tip>
|
||||
|
||||
The response will look something like this:
|
||||
|
|
@ -389,16 +389,16 @@ console.log(response);
|
|||
From here, you can explore how to use Honcho's features in your own applications:
|
||||
|
||||
<CardGroup cols={2}>
|
||||
<Card title="Get Context" icon="messages" href="/v2/documentation/features/get-context">
|
||||
<Card title="Get Context" icon="messages" href="/v2.6.0-alpha/documentation/features/get-context">
|
||||
Learn how to fetch the right context for your agent's next response
|
||||
</Card>
|
||||
<Card title="Architecture" icon="sitemap" href="/v2/documentation/core-concepts/architecture">
|
||||
<Card title="Architecture" icon="sitemap" href="/v2.6.0-alpha/documentation/core-concepts/architecture">
|
||||
Deep dive into how Honcho's primitives fit together
|
||||
</Card>
|
||||
<Card title="Chat Endpoint" icon="comments" href="/v2/documentation/features/chat">
|
||||
<Card title="Chat Endpoint" icon="comments" href="/v2.6.0-alpha/documentation/features/chat">
|
||||
Query representations with natural language
|
||||
</Card>
|
||||
<Card title="Guides" icon="book" href="/v2/guides/overview">
|
||||
<Card title="Guides" icon="book" href="/v2.6.0-alpha/guides/overview">
|
||||
Integration patterns and advanced use cases
|
||||
</Card>
|
||||
</CardGroup>
|
||||
|
|
|
|||
|
|
@ -23,9 +23,9 @@ I want to start building with Honcho - an open source memory library for buildin
|
|||
|
||||
**Documentation:**
|
||||
- Main docs: https://docs.honcho.dev
|
||||
- API Reference: https://docs.honcho.dev/v2/api-reference/introduction
|
||||
- Quickstart: https://docs.honcho.dev/v2/documentation/introduction/quickstart
|
||||
- Architecture: https://docs.honcho.dev/v2/documentation/core-concepts/architecture
|
||||
- API Reference: https://docs.honcho.dev/v2.6.0-alpha/api-reference/introduction
|
||||
- Quickstart: https://docs.honcho.dev/v2.6.0-alpha/documentation/introduction/quickstart
|
||||
- Architecture: https://docs.honcho.dev/v2.6.0-alpha/documentation/core-concepts/architecture
|
||||
|
||||
**Code & Examples:**
|
||||
- Core repo: https://github.com/plastic-labs/honcho
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
title: "The Honcho Dashboard"
|
||||
icon: "rocket"
|
||||
description: "Build socially intelligent agents without worrying about infrastructure"
|
||||
description: "Build stateful agents without worrying about infrastructure"
|
||||
sidebarTitle: "Dashboard Overview"
|
||||
---
|
||||
|
||||
|
|
@ -10,7 +10,7 @@ sidebarTitle: "Dashboard Overview"
|
|||
</Card>
|
||||
|
||||
The quickest way to begin using Honcho in production is with the
|
||||
[Honcho Cloud Platform](https://app.honcho.dev). Sign up, generate an API key,
|
||||
[Honcho Cloud Service](https://app.honcho.dev). Sign up, generate an API key,
|
||||
and start building with Honcho.
|
||||
|
||||
## 1. Go to [app.honcho.dev](https://app.honcho.dev)
|
||||
|
|
@ -93,7 +93,7 @@ Expand the `Peers` list from the `Workspace` dashboard to see a detailed view of
|
|||
<img src="/images/app-screenshots/peer-dash.png" alt="Peer Dashboard" width="1200" height="800" loading="lazy" decoding="async" fetchpriority="low" />
|
||||
</Frame>
|
||||
|
||||
Click into any peer to navigate to their respective utilities page. Next to the `Peer` name you can edit the [Global Peer Configuration](/v2/documentation/core-concepts/configuration), and in the tabs below, explore all utilities for the `Peer`.
|
||||
Click into any peer to navigate to their respective utilities page. Next to the `Peer` name you can edit the [Peer Configuration](/v2.6.0-alpha/documentation/features/advanced/reasoning-configuration), and in the tabs below, explore all utilities for the `Peer`.
|
||||
|
||||
<Frame>
|
||||
<img src="/images/app-screenshots/peer-utilities.png" alt="Peer Management Dashboard" width="1200" height="800" loading="lazy" decoding="async" fetchpriority="low" />
|
||||
|
|
@ -101,14 +101,14 @@ Click into any peer to navigate to their respective utilities page. Next to the
|
|||
|
||||
Utilities include:
|
||||
- **Message search** across all sessions for a `Peer`
|
||||
- **Dialectic Chat** to query `Peer` representations globally or session-scoped (results vary dependant on the `Peer`'s configuration)
|
||||
- **Chat** to query `Peer` representations with an optional session scope (results vary based on the `Peer`'s configuration)
|
||||
|
||||
<Frame>
|
||||
<img src="/images/app-screenshots/chat-endpoint.png" alt="Chat Endpoint" width="1200" height="800" loading="lazy" decoding="async" fetchpriority="low" />
|
||||
</Frame>
|
||||
|
||||
- **Session logs** view which `Sessions` the `Peer` is active
|
||||
- **Peer configuration and metadata management** including [Session-Peer Configuration](/v2/documentation/core-concepts/configuration#session-peer-configuration)
|
||||
- **Peer configuration and metadata management** including [Session-Peer Configuration](/v2.6.0-alpha/documentation/features/advanced/reasoning-configuration#session-configuration)
|
||||
|
||||
<Frame>
|
||||
<img src="/images/app-screenshots/peer-utilities.png" alt="Peer Management Dashboard" width="1200" height="800" loading="lazy" decoding="async" fetchpriority="low" />
|
||||
|
|
@ -153,9 +153,9 @@ The [Members](https://app.honcho.dev/members) page provides organization adminis
|
|||
|
||||
## Go Further
|
||||
|
||||
View the [Architecture](/v2/documentation/core-concepts/architecture) to see how Honcho works under the hood.
|
||||
View the [Architecture](/v2.6.0-alpha/documentation/core-concepts/architecture) to see how Honcho works under the hood.
|
||||
|
||||
Dive into our [API Reference](/v2/api-reference) to explore all available endpoints.
|
||||
Dive into our [API Reference](/v2.6.0-alpha/api-reference) to explore all available endpoints.
|
||||
|
||||
## Next Steps
|
||||
|
||||
|
|
@ -166,16 +166,11 @@ Dive into our [API Reference](/v2/api-reference) to explore all available endpoi
|
|||
<Card title="Join our Discord" icon="discord" href="http://discord.gg/plasticlabs">
|
||||
Connect with 1000+ developers building with Honcho
|
||||
</Card>
|
||||
<Card title="Contribute to Honcho" icon="code" href="/v2/contributing/guidelines">
|
||||
<Card title="Contribute to Honcho" icon="code" href="/v2.6.0-alpha/contributing/guidelines">
|
||||
View our guidelines and explore the codebase
|
||||
</Card>
|
||||
<Card title="Explore Examples" icon="book" href="/v2/guides">
|
||||
<Card title="Explore Examples" icon="book" href="/v2.6.0-alpha/guides">
|
||||
See Honcho in action with real examples
|
||||
</Card>
|
||||
</CardGroup>
|
||||
|
||||
We're excited to see what you'll build with Honcho Platform. Let's create smarter, more personalized AI experiences together!
|
||||
|
||||
---
|
||||
|
||||
*Ready to build personally aligned AI? [Get started with Honcho →](https://app.honcho.dev)*
|
||||
|
|
|
|||
|
|
@ -944,7 +944,7 @@ const response = await openai.chat.completions.create({
|
|||
When creating messages, you can optionally specify a custom `created_at` timestamp instead of using the server's current time:
|
||||
|
||||
```bash
|
||||
curl -X POST "https://api.honcho.dev/v2/workspaces/{workspace_id}/sessions/{session_id}/messages" \
|
||||
curl -X POST "https://api.honcho.dev/v2.6.0-alpha/workspaces/{workspace_id}/sessions/{session_id}/messages" \
|
||||
-H "Authorization: Bearer $API_KEY" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
|
|
@ -968,7 +968,7 @@ If `created_at` is not provided, messages will use the server's current timestam
|
|||
|
||||
### Metadata and Filtering
|
||||
|
||||
See [Using Filters](/v2/guides/using-filters) for more examples on how to use filters.
|
||||
See [Using Filters](/v2.6.0-alpha/guides/using-filters) for more examples on how to use filters.
|
||||
|
||||
<CodeGroup>
|
||||
```python Python
|
||||
|
|
|
|||
|
|
@ -150,13 +150,13 @@ for query in user_queries:
|
|||
## Related Features
|
||||
|
||||
<CardGroup cols={3}>
|
||||
<Card title="Basic Get Context" icon="database" href="/v2/documentation/core-concepts/features/get-context">
|
||||
<Card title="Basic Get Context" icon="database" href="/v2.6.0-alpha/documentation/core-concepts/features/get-context">
|
||||
Learn about basic context retrieval
|
||||
</Card>
|
||||
<Card title="Summaries" icon="align-left" href="/v2/documentation/core-concepts/summarizer">
|
||||
<Card title="Summaries" icon="align-left" href="/v2.6.0-alpha/documentation/core-concepts/summarizer">
|
||||
Understand session summarization
|
||||
</Card>
|
||||
<Card title="Dialectic API" icon="comments" href="/v2/documentation/core-concepts/features/dialectic-endpoint">
|
||||
<Card title="Dialectic API" icon="comments" href="/v2.6.0-alpha/documentation/core-concepts/features/dialectic-endpoint">
|
||||
Chat with Honcho for insights
|
||||
</Card>
|
||||
</CardGroup>
|
||||
|
|
|
|||
|
|
@ -237,19 +237,19 @@ and Bob. We:
|
|||
|
||||
As soon as you save a message in Honcho, it will start to reason about it to
|
||||
pull out insights and develop a profile of the user. This is the default
|
||||
behavior and can be toggled off via [the configuration](/v2/documentation/core-concepts/configuration).
|
||||
behavior and can be toggled off via [the configuration](/v2.6.0-alpha/documentation/core-concepts/configuration).
|
||||
|
||||
## Next Steps
|
||||
|
||||
<CardGroup cols={3}>
|
||||
<Card title="Architecture" icon="rocket"
|
||||
href="/v2/documentation/core-concepts/architecture">
|
||||
href="/v2.6.0-alpha/documentation/core-concepts/architecture">
|
||||
Learn about the data primitives in Honcho and how they work together
|
||||
</Card>
|
||||
<Card title="Start Building" icon="brain" href="https://app.honcho.dev">
|
||||
Sign up for Managed Honcho and get started building agents now.
|
||||
</Card>
|
||||
<Card title="Guides" icon="book" href="/v2/guides/overview">
|
||||
<Card title="Guides" icon="book" href="/v2.6.0-alpha/guides/overview">
|
||||
Check out spellbooks to see different examples apps built with Honcho
|
||||
</Card>
|
||||
</CardGroup>
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ This feature is illustrated in the graphic below:
|
|||
|
||||
We can enable local representation for a `Peer` by setting `observe_others=True`.
|
||||
This is shown in the [Configure
|
||||
Reasoning](/v2/documentation/core-concepts/configuration) page.
|
||||
Reasoning](/v2.6.0-alpha/documentation/core-concepts/configuration) page.
|
||||
|
||||
Now if we used Bob's local representation of Alice then Bob would only get
|
||||
insights on what they've seen Alice say to them.
|
||||
|
|
|
|||
|
|
@ -1,347 +0,0 @@
|
|||
---
|
||||
title: 'Working Representations'
|
||||
description: "Learn how to retrieve cached peer knowledge and understanding using Honcho's working representation system"
|
||||
icon: 'brain'
|
||||
---
|
||||
|
||||
Working representations are Honcho's system for accessing cached psychological models that capture what peers know, think, and remember. Unlike the `chat()` method which generates fresh representations on-demand, the `working_rep()` method retrieves pre-computed representations that have been automatically built and stored as conversations progress.
|
||||
|
||||
## How Working Representations Are Created
|
||||
|
||||
Working representations are automatically generated and cached through Honcho's background processing system:
|
||||
|
||||
1. **Automatic Generation**: When messages are added to sessions, they trigger background jobs that analyze conversations using theory of mind inference and long-term memory integration
|
||||
|
||||
2. **Cached Storage**: The generated representations are stored in the database as metadata on `Peer` objects (for global representations) or `SessionPeer` objects (for session-scoped representations)
|
||||
|
||||
3. **Retrieval**: The `working_rep()` method provides fast access to these cached representations without requiring LLM processing
|
||||
|
||||
<Info>
|
||||
**Cached vs On-Demand**: `working_rep()` retrieves cached representations for fast access, while `peer.chat()` generates fresh representations using the dialectic system. Use `working_rep()` when you need fast access to stored knowledge, and `chat()` when you need current analysis with custom queries.
|
||||
</Info>
|
||||
|
||||
## Basic Usage
|
||||
|
||||
Working representations are accessed through the `working_rep()` method on Session or Peer objects:
|
||||
|
||||
<CodeGroup>
|
||||
```python Python
|
||||
from honcho import Honcho
|
||||
|
||||
# Initialize client
|
||||
honcho = Honcho()
|
||||
|
||||
# Create peers and session
|
||||
user = honcho.peer("user-123")
|
||||
assistant = honcho.peer("ai-assistant")
|
||||
session = honcho.session("support-conversation")
|
||||
|
||||
# Add conversation to trigger representation generation
|
||||
session.add_messages([
|
||||
user.message("I'm having trouble with my billing account"),
|
||||
assistant.message("I can help with that. What specific issue are you seeing?"),
|
||||
user.message("My credit card was charged twice last month"),
|
||||
assistant.message("I see duplicate charges on your account. Let me refund one of them.")
|
||||
])
|
||||
|
||||
# Chat to generate a working representation
|
||||
response = user.chat("What is this user's main concern right now?", session_id=session.id)
|
||||
|
||||
# Retrieve the cached working representation for the user
|
||||
user_representation = session.working_rep("user-123")
|
||||
print("Cached user representation:", user_representation)
|
||||
|
||||
# Or access from the peer directly
|
||||
peer_representation = user.working_rep()
|
||||
```
|
||||
|
||||
```typescript TypeScript
|
||||
import { Honcho } from "@honcho-ai/sdk";
|
||||
|
||||
// Initialize client
|
||||
const honcho = new Honcho({});
|
||||
|
||||
// Create peers and session
|
||||
const user = await honcho.peer("user-123");
|
||||
const assistant = await honcho.peer("ai-assistant");
|
||||
const session = await honcho.session("support-conversation");
|
||||
|
||||
// Add conversation to trigger representation generation
|
||||
await session.addMessages([
|
||||
user.message("I'm having trouble with my billing account"),
|
||||
assistant.message("I can help with that. What specific issue are you seeing?"),
|
||||
user.message("My credit card was charged twice last month"),
|
||||
assistant.message("I see duplicate charges on your account. Let me refund one of them.")
|
||||
]);
|
||||
|
||||
// Chat to generate a working representation
|
||||
const response = await user.chat("What is this user's main concern right now?", { sessionId: session.id });
|
||||
|
||||
// Retrieve the cached working representation for the user
|
||||
const userRepresentation = await session.workingRep("user-123");
|
||||
console.log("Cached user representation:", userRepresentation);
|
||||
|
||||
// Or access from the peer directly
|
||||
const peerRepresentation = await user.workingRep();
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
## Semantic Search in Representations
|
||||
|
||||
Working representations support semantic search to retrieve the most relevant observations for a given query. This is useful when you want to focus the representation on specific topics.
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
|-----------|------|-------------|
|
||||
| `search_query` | `str` | Semantic search query to filter relevant observations |
|
||||
| `search_top_k` | `int` | Number of semantic search results to include (1-100) |
|
||||
| `search_max_distance` | `float` | Maximum semantic distance threshold (0.0-1.0) |
|
||||
| `include_most_derived` | `bool` | Whether to include the most recently derived observations |
|
||||
| `max_observations` | `int` | Maximum number of observations to include (1-100) |
|
||||
|
||||
<CodeGroup>
|
||||
```python Python
|
||||
# Get representation focused on a specific topic
|
||||
billing_rep = session.working_rep(
|
||||
"user-123",
|
||||
search_query="billing and payment issues",
|
||||
search_top_k=10,
|
||||
search_max_distance=0.8,
|
||||
include_most_derived=True,
|
||||
max_observations=25
|
||||
)
|
||||
|
||||
# Get representation from peer with target
|
||||
# What user-123 knows about the assistant
|
||||
local_rep = session.working_rep(
|
||||
"user-123",
|
||||
target="ai-assistant",
|
||||
search_query="support interactions"
|
||||
)
|
||||
|
||||
# Access from peer object with semantic search
|
||||
user_rep = user.working_rep(
|
||||
session=session,
|
||||
search_query="preferences",
|
||||
search_top_k=5
|
||||
)
|
||||
```
|
||||
|
||||
```typescript TypeScript
|
||||
// Get representation focused on a specific topic
|
||||
const billingRep = await session.workingRep("user-123", {
|
||||
searchQuery: "billing and payment issues",
|
||||
searchTopK: 10,
|
||||
searchMaxDistance: 0.8,
|
||||
includeMostDerived: true,
|
||||
maxObservations: 25
|
||||
});
|
||||
|
||||
// Get representation from peer with target
|
||||
// What user-123 knows about the assistant
|
||||
const localRep = await session.workingRep("user-123", {
|
||||
target: "ai-assistant",
|
||||
searchQuery: "support interactions"
|
||||
});
|
||||
|
||||
// Access from peer object with semantic search
|
||||
const userRep = await user.workingRep(session, undefined, {
|
||||
searchQuery: "preferences",
|
||||
searchTopK: 5
|
||||
});
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
## Understanding Representation Content
|
||||
|
||||
Cached working representations contain structured psychological analysis based on conversation history. The format typically includes:
|
||||
|
||||
### Current Mental State Predictions
|
||||
Information about what the peer is currently thinking, feeling, or focused on based on recent messages.
|
||||
|
||||
### Relevant Long-term Facts
|
||||
Facts about the peer that have been extracted and stored over time from various conversations.
|
||||
|
||||
### Example Representation Structure
|
||||
|
||||
<CodeGroup>
|
||||
```python Python
|
||||
# Example of what a cached representation might contain
|
||||
representation = session.working_rep("user-123")
|
||||
|
||||
# Typical content structure:
|
||||
"""
|
||||
PREDICTION ABOUT THE USER'S CURRENT MENTAL STATE:
|
||||
The user appears frustrated with a billing issue, specifically concerning duplicate charges.
|
||||
They seem to have some confidence in the support process as they provided specific details.
|
||||
|
||||
RELEVANT LONG-TERM FACTS ABOUT THE USER:
|
||||
- User has had previous billing inquiries
|
||||
- User prefers direct, specific communication
|
||||
- User is detail-oriented when reporting issues
|
||||
"""
|
||||
|
||||
print("Full representation:", representation)
|
||||
```
|
||||
|
||||
```typescript TypeScript
|
||||
// Example of what a cached representation might contain
|
||||
const representation = await session.workingRep("user-123");
|
||||
|
||||
// Typical content structure:
|
||||
/*
|
||||
PREDICTION ABOUT THE USER'S CURRENT MENTAL STATE:
|
||||
The user appears frustrated with a billing issue, specifically concerning duplicate charges.
|
||||
They seem to have some confidence in the support process as they provided specific details.
|
||||
|
||||
RELEVANT LONG-TERM FACTS ABOUT THE USER:
|
||||
- User has had previous billing inquiries
|
||||
- User prefers direct, specific communication
|
||||
- User is detail-oriented when reporting issues
|
||||
*/
|
||||
|
||||
console.log("Full representation:", representation);
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
## When Representations Are Updated
|
||||
|
||||
Working representations are automatically updated through Honcho's background processing system:
|
||||
|
||||
### Message Processing Pipeline
|
||||
|
||||
1. **Message Creation**: When messages are added via `session.add_messages()` or similar methods
|
||||
2. **Background Queuing**: Messages are queued for processing in the background
|
||||
3. **Theory of Mind Analysis**: The system analyzes conversation patterns and psychological states
|
||||
4. **Fact Extraction**: Long-term facts are extracted and stored in vector embeddings
|
||||
5. **Representation Generation**: New representations are created combining current analysis with historical facts
|
||||
6. **Cache Update**: The new representation is stored in the database metadata
|
||||
|
||||
### Processing Triggers
|
||||
|
||||
Representations are updated when:
|
||||
- New messages are added to sessions
|
||||
- Sufficient new content has accumulated
|
||||
- The background processing system determines an update is needed
|
||||
|
||||
## Comparison with Chat Method
|
||||
|
||||
Understanding when to use `working_rep()` vs `peer.chat()`:
|
||||
|
||||
### Use `working_rep()` when:
|
||||
- You need fast access to stored psychological models
|
||||
- You want to see what the system has already learned about a peer
|
||||
- You're building dashboards or analytics that display peer understanding
|
||||
- You need consistent representations that don't change between calls
|
||||
|
||||
### Use `peer.chat()` when:
|
||||
- You need to ask specific questions about a peer
|
||||
- You want fresh analysis based on current conversation state
|
||||
- You need customized insights for specific use cases
|
||||
- You want to query about relationships between peers
|
||||
|
||||
<CodeGroup>
|
||||
```python Python
|
||||
# Fast cached access
|
||||
cached_rep = session.working_rep("user-123")
|
||||
print("Cached:", cached_rep[:100] + "...")
|
||||
|
||||
# Custom query with fresh analysis
|
||||
custom_analysis = user.chat("What is this user's main concern right now?", session_id=session.id)
|
||||
print("Fresh analysis:", custom_analysis)
|
||||
```
|
||||
|
||||
```typescript TypeScript
|
||||
// Fast cached access
|
||||
const cachedRep = await session.workingRep("user-123");
|
||||
console.log("Cached:", cachedRep.substring(0, 100) + "...");
|
||||
|
||||
// Custom query with fresh analysis
|
||||
const customAnalysis = await user.chat("What is this user's main concern right now?", { sessionId: session.id });
|
||||
console.log("Fresh analysis:", customAnalysis);
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
## Best Practices
|
||||
|
||||
### 1. Ensure Availability Before Using
|
||||
|
||||
Make sure that a representation exists before processing it by using the chat endpoint first.
|
||||
|
||||
### 2. Use for Fast Analytics
|
||||
|
||||
Cached representations are ideal for analytics dashboards:
|
||||
|
||||
<CodeGroup>
|
||||
```python Python
|
||||
# Good: Fast dashboard updates using cached data
|
||||
def update_analytics_dashboard(sessions):
|
||||
analytics = {}
|
||||
for session in sessions:
|
||||
for peer_id in session.get_peer_ids():
|
||||
rep = session.working_rep(peer_id)
|
||||
analytics[peer_id] = analyze_representation(rep)
|
||||
return analytics
|
||||
```
|
||||
|
||||
```typescript TypeScript
|
||||
// Good: Fast dashboard updates using cached data
|
||||
async function updateAnalyticsDashboard(sessions) {
|
||||
const analytics: Record<string, any> = {};
|
||||
for (const session of sessions) {
|
||||
const peerIds = await session.getPeerIds();
|
||||
for (const peerId of peerIds) {
|
||||
const rep = await session.workingRep(peerId);
|
||||
analytics[peerId] = analyzeRepresentation(rep);
|
||||
}
|
||||
}
|
||||
return analytics;
|
||||
}
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
### 3. Combine with Fresh Analysis When Needed
|
||||
|
||||
Use cached representations for baseline understanding, and fresh analysis for current insights:
|
||||
|
||||
<CodeGroup>
|
||||
```python Python
|
||||
# Get baseline understanding from cache
|
||||
baseline = session.working_rep("user-123")
|
||||
|
||||
# Get current specific insights
|
||||
current_state = user.chat("How is this user feeling right now?", session_id=session.id)
|
||||
|
||||
# Combine for comprehensive view
|
||||
comprehensive_view = {
|
||||
"baseline_knowledge": baseline,
|
||||
"current_analysis": current_state
|
||||
}
|
||||
```
|
||||
|
||||
```typescript TypeScript
|
||||
// Get baseline understanding from cache
|
||||
const baseline = await session.workingRep("user-123");
|
||||
|
||||
// Get current specific insights
|
||||
const currentState = await user.chat("How is this user feeling right now?", { sessionId: session.id });
|
||||
|
||||
// Combine for comprehensive view
|
||||
const comprehensiveView = {
|
||||
baselineKnowledge: baseline,
|
||||
currentAnalysis: currentState
|
||||
};
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
## Conclusion
|
||||
|
||||
Working representations provide fast access to cached psychological models that Honcho automatically builds and maintains. By understanding how to:
|
||||
|
||||
- Retrieve cached representations using `session.working_rep()`
|
||||
- Parse and interpret representation content
|
||||
- Handle cases where representations aren't available
|
||||
- Combine cached and fresh analysis appropriately
|
||||
|
||||
You can build efficient applications that leverage Honcho's continuous learning about peer knowledge and mental states without the latency of real-time generation.
|
||||
|
|
@ -53,7 +53,7 @@ This tutorial uses the Honcho demo server at https://demo.honcho.dev which runs
|
|||
The `honcho_crewai` package provides `HonchoStorage`, a storage provider that implements CrewAI's `Storage` interface using Honcho's session-based memory.
|
||||
|
||||
<Note>
|
||||
Before proceeding, it's important to understand Honcho's core concepts (`Peers` and `Sessions`). Review the [Honcho Architecture](/v2/documentation/core-concepts/architecture) to familiarize yourself with these primitives.
|
||||
Before proceeding, it's important to understand Honcho's core concepts (`Peers` and `Sessions`). Review the [Honcho Architecture](/v2.6.0-alpha/documentation/core-concepts/architecture) to familiarize yourself with these primitives.
|
||||
</Note>
|
||||
|
||||
`HonchoStorage` implements CrewAI's `Storage` interface using Honcho's `peer` and `session` primitives.
|
||||
|
|
@ -97,7 +97,7 @@ results = storage.search("query", filters={
|
|||
})
|
||||
```
|
||||
|
||||
For the full filter syntax including logical operators (AND, OR, NOT), comparison operators, and metadata filtering, see the [Using Filters](https://docs.honcho.dev/v2/documentation/core-concepts/features/using-filters) documentation.
|
||||
For the full filter syntax including logical operators (AND, OR, NOT), comparison operators, and metadata filtering, see the [Using Filters](https://docs.honcho.dev/v2.6.0-alpha/documentation/core-concepts/features/using-filters) documentation.
|
||||
|
||||
<Note>
|
||||
For comprehensive details about CrewAI's memory system, see the [official CrewAI Memory documentation](https://docs.crewai.com/en/concepts/memory).
|
||||
|
|
@ -279,16 +279,16 @@ Now that you have a working CrewAI integration with Honcho, you can:
|
|||
## Related Resources
|
||||
|
||||
<CardGroup cols={2}>
|
||||
<Card title="Honcho Architecture" icon="sitemap" href="/v2/documentation/core-concepts/architecture">
|
||||
<Card title="Honcho Architecture" icon="sitemap" href="/v2.6.0-alpha/documentation/core-concepts/architecture">
|
||||
Understand Honcho's peer-based model and core primitives
|
||||
</Card>
|
||||
<Card title="Get Context" icon="messages" href="/v2/documentation/core-concepts/features/get-context">
|
||||
<Card title="Get Context" icon="messages" href="/v2.6.0-alpha/documentation/core-concepts/features/get-context">
|
||||
Learn about retrieving and formatting conversation context
|
||||
</Card>
|
||||
<Card title="Dialectic API" icon="brain" href="/v2/documentation/core-concepts/features/dialectic">
|
||||
<Card title="Dialectic API" icon="brain" href="/v2.6.0-alpha/documentation/core-concepts/features/dialectic">
|
||||
Query `peer` representations for deeper understanding
|
||||
</Card>
|
||||
<Card title="LangGraph Integration" icon="diagram-project" href="/v2/integrations/langgraph">
|
||||
<Card title="LangGraph Integration" icon="diagram-project" href="/v2.6.0-alpha/integrations/langgraph">
|
||||
Build stateful agents with LangGraph and Honcho
|
||||
</Card>
|
||||
</CardGroup>
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ const llm = new OpenAI({
|
|||
Define your state schema to pass data through the graph. The state stores Honcho objects directly along with the current user message and assistant response.
|
||||
|
||||
<Note>
|
||||
Before proceeding, it's important to understand Honcho's core concepts (`Peers` and `Sessions`). Review the [Honcho Architecture](/v2/documentation/core-concepts/architecture) to familiarize yourself with these primitives.
|
||||
Before proceeding, it's important to understand Honcho's core concepts (`Peers` and `Sessions`). Review the [Honcho Architecture](/v2.6.0-alpha/documentation/core-concepts/architecture) to familiarize yourself with these primitives.
|
||||
</Note>
|
||||
|
||||
<CodeGroup>
|
||||
|
|
@ -227,7 +227,7 @@ const graph = new StateGraph(StateAnnotation)
|
|||
|
||||
### Understanding get_context()
|
||||
|
||||
The [`get_context()`](/v2/documentation/core-concepts/features/get-context) method retrieves comprehensive conversation context and formats it for your LLM. It automatically:
|
||||
The [`get_context()`](/v2.6.0-alpha/documentation/core-concepts/features/get-context) method retrieves comprehensive conversation context and formats it for your LLM. It automatically:
|
||||
|
||||
- **Manages conversation history** - Tracks all messages and determines what's relevant
|
||||
- **Respects token limits** - Stays within context window constraints without manual counting
|
||||
|
|
@ -248,7 +248,7 @@ That's it. Call `session.get_context().to_openai(assistant)` and you get properl
|
|||
</Tip>
|
||||
|
||||
<Note>
|
||||
For more details on all available parameters, see [`get_context() documentation`](/v2/documentation/core-concepts/features/get-context)
|
||||
For more details on all available parameters, see [`get_context() documentation`](/v2.6.0-alpha/documentation/core-concepts/features/get-context)
|
||||
</Note>
|
||||
|
||||
## Chat Loop
|
||||
|
|
@ -354,10 +354,10 @@ Now that you have a working LangGraph integration with Honcho, you can:
|
|||
## Related Resources
|
||||
|
||||
<CardGroup cols={2}>
|
||||
<Card title="Get Context" icon="messages" href="/v2/documentation/core-concepts/features/get-context">
|
||||
<Card title="Get Context" icon="messages" href="/v2.6.0-alpha/documentation/core-concepts/features/get-context">
|
||||
Learn more about retrieving and formatting conversation context
|
||||
</Card>
|
||||
<Card title="MCP Integration" icon="star-of-life" href="/v2/integrations/mcp">
|
||||
<Card title="MCP Integration" icon="star-of-life" href="/v2.6.0-alpha/integrations/mcp">
|
||||
Use Honcho in Claude Desktop with MCP
|
||||
</Card>
|
||||
</CardGroup>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ description: 'Helpful guides and design patterns for building with Honcho'
|
|||
icon: 'hat-wizard'
|
||||
---
|
||||
|
||||
<Note> Before you start a guide, follow [Quickstart](/v2/documentation/introduction/quickstart) to get up and running with Honcho in your language of choice. </Note>
|
||||
<Note> Before you start a guide, follow [Quickstart](/v2.6.0-alpha/documentation/introduction/quickstart) to get up and running with Honcho in your language of choice. </Note>
|
||||
|
||||
These guides provide concrete examples and implementation patterns for building with Honcho. Whether you're integrating Honcho into existing platforms, exploring advanced features, or getting up and running quickly, you'll find working code you can adapt to your needs.
|
||||
|
||||
|
|
@ -16,10 +16,10 @@ Each guide focuses on a specific use case with practical examples. The goal is t
|
|||
Quick integration guides to get up and running:
|
||||
|
||||
<CardGroup cols={2}>
|
||||
<Card title="MCP Integration" icon="link" href="/v2/integrations/mcp">
|
||||
<Card title="MCP Integration" icon="link" href="/v2.6.0-alpha/integrations/mcp">
|
||||
Get Honcho running with a single prompt in Claude Code
|
||||
</Card>
|
||||
<Card title="LangGraph" icon="diagram-project" href="/v2/integrations/langgraph">
|
||||
<Card title="LangGraph" icon="diagram-project" href="/v2.6.0-alpha/integrations/langgraph">
|
||||
Add persistent memory and theory of mind to your LangGraph agents
|
||||
</Card>
|
||||
</CardGroup>
|
||||
|
|
@ -28,10 +28,10 @@ Quick integration guides to get up and running:
|
|||
Ready-to-use integration patterns for popular platforms:
|
||||
|
||||
<CardGroup cols={2}>
|
||||
<Card title="Discord Bot" icon="discord" href="/v2/guides/discord">
|
||||
<Card title="Discord Bot" icon="discord" href="/v2.6.0-alpha/guides/discord">
|
||||
Build a Discord bot that remembers users across conversations
|
||||
</Card>
|
||||
<Card title="Telegram Bot" icon="telegram" href="/v2/guides/telegram">
|
||||
<Card title="Telegram Bot" icon="telegram" href="/v2.6.0-alpha/guides/telegram">
|
||||
Create a Telegram bot with persistent user understanding
|
||||
</Card>
|
||||
</CardGroup>
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ Once a `Message` is saved in Honcho, it will kick off a background task that
|
|||
looks at the new data to generate insights about the `Peer` that sent the `Message`
|
||||
|
||||
This is the default behavior of Honcho and can be turned off by [configuring the
|
||||
Peer or Session](/v2/documentation/core-concepts/configuration)
|
||||
Peer or Session](/v2.6.0-alpha/documentation/core-concepts/configuration)
|
||||
|
||||
This pattern of having a Peer, Session, and Messages is highly flexible and
|
||||
works for many different use cases and agent setups. Some use cases may only
|
||||
|
|
|
|||
|
|
@ -84,4 +84,4 @@ for await (const line of responseStream.iter_text()) {
|
|||
```
|
||||
</CodeGroup>
|
||||
|
||||
We've designed the Dialectic endpoint to be infinitely flexible. We wrote an incomplete list of ideas on how to use it on our blog [here](https://blog.plasticlabs.ai/blog/Introducing-Honcho's-Dialectic-API#how-it-works).
|
||||
We've designed the Dialectic endpoint to be infinitely flexible. We wrote an incomplete list of ideas on how to use it on our blog [here](https://blog.plasticlabs.ai/archive/ARCHIVED;-Introducing-Honcho's-Dialectic-API#how-it-works).
|
||||
|
|
|
|||
|
|
@ -26,38 +26,32 @@ prompting you to create a new one.
|
|||
</div>
|
||||
|
||||
|
||||
Once you've created an organization, you'll be taken to the dashboard and see
|
||||
the Welcome page with integration guidance and links to documentation.
|
||||
Once you've created an organization, you'll be taken to the welcome dashboard.
|
||||
|
||||
<Frame>
|
||||
<img src="/images/app-screenshots/get-started-copy.png" alt="Honcho Dashboard Getting Started" width="1200" height="800" loading="lazy" decoding="async" fetchpriority="low" />
|
||||
</Frame>
|
||||
|
||||
Each organization has dedicated infrastructure running to isolate your
|
||||
workloads. Once you add a valid payment method under the
|
||||
Each organization has dedicated infrastructure running to isolate your workloads.
|
||||
Once you add a valid payment method under the
|
||||
[Billing](https://app.honcho.dev/billing) page, your instance will turn on.
|
||||
|
||||
## 2. Activate your Honcho instance
|
||||
|
||||
Navigate to the [Billing](https://app.honcho.dev/billing) page to add a payment method. Your Honcho instance provisions automatically, and you can monitor the deployment on the [Instance Status](https://app.honcho.dev/status) page until all systems show a green check mark.
|
||||
With credits and a payment method on file (managed via the [Billing](https://app.honcho.dev/billing) page), your Honcho instance will be provisioned and ready to use. Monitor your machine status, and check for version upgrades on the [Instance Status](https://app.honcho.dev/status) page.
|
||||
|
||||
<Frame>
|
||||
<img src="/images/app-screenshots/status-page.png" alt="Instance Status Page" width="1200" height="800" loading="lazy" decoding="async" fetchpriority="low" />
|
||||
</Frame>
|
||||
|
||||
You can also upgrade Honcho when new versions are made available directly from the status page.
|
||||
If there is an upgrade available you will see an indicator like this:
|
||||
|
||||
<div style={{ maxWidth: "700px", margin: "0 auto" }}>
|
||||
<Frame>
|
||||
<img src="/images/app-screenshots/upgrade-honcho.png" alt="Upgrade Honcho" loading="lazy" decoding="async" fetchpriority="low" style={{ width: "100%", height: "auto" }} />
|
||||
</Frame>
|
||||
</div>
|
||||
|
||||
The **Performance** page provides comprehensive monitoring with usage metrics, health analytics, API response times, and endpoint usage across Honcho.
|
||||
|
||||
<Frame>
|
||||
<img src="/images/app-screenshots/performance-analytics.png" alt="Performance Analytics Dashboard" width="1200" height="800" loading="lazy" decoding="async" fetchpriority="low" />
|
||||
</Frame>
|
||||
Upgrading your machines may take a few minutes and you can monitor progress. If for any reason your machine goes offline, you will see a red status indicator. Navigate to the [Instance Status](https://app.honcho.dev/status) page and try to trigger a refresh of your machines.
|
||||
|
||||
## 3. Manage API Keys
|
||||
The [API Keys](https://app.honcho.dev/api-keys) page allows you to create and manage authentication tokens for different environments. You can create admin-level keys with full instance access or scope keys to specific `Workspaces`, `Peers`, or `Sessions`.
|
||||
|
|
@ -67,12 +61,48 @@ The [API Keys](https://app.honcho.dev/api-keys) page allows you to create and ma
|
|||
</Frame>
|
||||
|
||||
## 4. Test with API Playground
|
||||
The [API Playground](https://app.honcho.dev/playground) provides a Postman-like interface to test queries, explore endpoints, and validate your integration. Authenticate with an API key and send requests directly to your Honcho instance with real-time responses and full request/response logging.
|
||||
The [API Playground](https://app.honcho.dev/playground) provides a developer-friendly interface to quickly iterate and test queries, explore endpoints, and validate your integration directly from your browser—no code required.
|
||||
|
||||
<Frame>
|
||||
<img src="/images/app-screenshots/api-playground.png" alt="API Playground Interface" width="1200" height="800" loading="lazy" decoding="async" fetchpriority="low" />
|
||||
</Frame>
|
||||
|
||||
|
||||
The playground automatically loads all available API endpoints to match your Honcho instance version. Endpoints can be filtered by category at the top of the list.
|
||||
|
||||
If you prefer, you can set up your queries in the UI and copy to cURL for help with building scripts or general terminal use.
|
||||
|
||||
### Step-by-Step:
|
||||
|
||||
**1. Select an Endpoint**: Choose your desired endpoint from the available list.
|
||||
|
||||
**2. Choose Path Parameters**: For fields like Workspace, Session, or Peer, select options from dropdown menus—no need to manually enter IDs.
|
||||
|
||||
**3. Add Request Body Data**: Complete any required fields for POST/PUT requests.
|
||||
|
||||
**4. Execute or Copy Request**: Run it directly or copy as cURL to use elsewhere (just add your API key).
|
||||
|
||||
|
||||
### Example Usage
|
||||
|
||||
Build a complete conversation flow without ever leaving the playground:
|
||||
|
||||
1. **Create a Workspace**:
|
||||
select `POST Get or Create Workspace` and type workspace name into the request body
|
||||
→ Returns workspace ID
|
||||
|
||||
2. **Create new Peer(s)**:
|
||||
select `POST Get or Create Peer,` choose your workspace from the dropdown, and type peer name into the request body. (repeat for each peer)
|
||||
→ Returns peer ID
|
||||
|
||||
3. **POST Get or Create Session**
|
||||
`POST /sessions` selecting your workspace from the dropdown then type session name into the request body
|
||||
→ Returns session ID and adds to dropdown
|
||||
|
||||
4. **POST Create Messages for Session**
|
||||
`POST /messages` selecting your workspace & session from the dropdown then type peer id(s) and message content into the request body
|
||||
→ Adds message(s) to the session
|
||||
|
||||
## 5. Workspaces
|
||||
The [Explore](https://app.honcho.dev/explore) page provides comprehensive `Workspace` management where you can create workspaces and begin exploring the platform. Each `Workspace` serves as a container for organizing your Honcho data.
|
||||
|
||||
|
|
@ -137,14 +167,27 @@ Here you can:
|
|||
<img src="/images/app-screenshots/get-context.png" alt="Get Context" width="1200" height="800" loading="lazy" decoding="async" fetchpriority="low" />
|
||||
</Frame>
|
||||
|
||||
## 8. Webhooks Integration
|
||||
The [Webhooks](https://app.honcho.dev/webhooks) page enables Webhook creation and management.
|
||||
## 8. Performance Monitoring & Analytics
|
||||
|
||||
The **Performance** page offers comprehensive monitoring tools, including usage metrics, health analytics, API response times, and endpoint usage across Honcho.
|
||||
|
||||
<Frame>
|
||||
<img src="/images/app-screenshots/performance-analytics.png" alt="Performance Analytics Dashboard" width="1200" height="800" loading="lazy" decoding="async" fetchpriority="low" />
|
||||
</Frame>
|
||||
|
||||
## 9. Webhooks Integration
|
||||
|
||||
The [Webhooks](https://app.honcho.dev/webhooks) page allows managing and creation of webhooks for Honcho. React to events in real-time—such as message delivery, session updates, peer state changes, and more—by sending event payloads via HTTP POST requests to your provided endpoints.
|
||||
|
||||
<Frame>
|
||||
<img src="/images/app-screenshots/webhooks-page.png" alt="Webhooks Dashboard" width="1200" height="800" loading="lazy" decoding="async" fetchpriority="low" />
|
||||
</Frame>
|
||||
<Frame>
|
||||
<img src="/images/app-screenshots/webhooks-create.png" alt="Create New Webhook" width="400" height="267" loading="lazy" decoding="async" fetchpriority="low" />
|
||||
</Frame>
|
||||
|
||||
## 10. Organization Member Access
|
||||
|
||||
## 9. Organization Member Access
|
||||
The [Members](https://app.honcho.dev/members) page provides organization administration to manage your team's access to Honcho with the ability to grant admin permissions.
|
||||
|
||||
<Frame>
|
||||
|
|
|
|||
2318
docs/v2/openapi.json
2318
docs/v2/openapi.json
File diff suppressed because it is too large
Load Diff
15
mcp/bun.lock
15
mcp/bun.lock
|
|
@ -4,11 +4,10 @@
|
|||
"": {
|
||||
"name": "honcho-mcp-proxy",
|
||||
"dependencies": {
|
||||
"@honcho-ai/sdk": "^1.2.1",
|
||||
"@honcho-ai/sdk": "^1.6.0",
|
||||
},
|
||||
"devDependencies": {
|
||||
"@cloudflare/workers-types": "^4.20241002.0",
|
||||
"only-allow": "^1.2.1",
|
||||
"typescript": "^5.3.3",
|
||||
"wrangler": "^4.24.3",
|
||||
},
|
||||
|
|
@ -85,9 +84,9 @@
|
|||
|
||||
"@esbuild/win32-x64": ["@esbuild/win32-x64@0.25.4", "", { "os": "win32", "cpu": "x64" }, "sha512-nOT2vZNw6hJ+z43oP1SPea/G/6AbN6X+bGNhNuq8NtRHy4wsMhw765IKLNmnjek7GvjWBYQ8Q5VBoYTFg9y1UQ=="],
|
||||
|
||||
"@honcho-ai/core": ["@honcho-ai/core@1.2.0", "", { "dependencies": { "@types/node": "^18.11.18", "@types/node-fetch": "^2.6.4", "abort-controller": "^3.0.0", "agentkeepalive": "^4.2.1", "form-data-encoder": "1.7.2", "formdata-node": "^4.3.2", "node-fetch": "^2.6.7" } }, "sha512-VPHCFIGfC00GeE4P83DDIT7hkuMnMVkWlMTmMd2tw4HSEUciqLBh09AX/6aMKfJAzprg1diub6pJJ6LJP6eJ+g=="],
|
||||
"@honcho-ai/core": ["@honcho-ai/core@1.8.0", "", { "dependencies": { "@types/node": "^18.11.18", "@types/node-fetch": "^2.6.4", "abort-controller": "^3.0.0", "agentkeepalive": "^4.2.1", "form-data-encoder": "1.7.2", "formdata-node": "^4.3.2", "node-fetch": "^2.6.7" } }, "sha512-qxBNoXLezH8yx4iBoz4Bsxkm9zp4Gm1fNwuP8gHRdSelxhR0dXpvLffx8B5V0XFWsx+SfPaJFyaKw0X2sYMwLA=="],
|
||||
|
||||
"@honcho-ai/sdk": ["@honcho-ai/sdk@1.2.1", "", { "dependencies": { "@honcho-ai/core": "1.2.0", "@types/node": "^24.0.1" } }, "sha512-/RFHq9R9XsD1uj3KPZkZ4aGMuyan6gmIXu3HFND7Aipe3PGFeMEmteFmcMVGi3FO3F5S+NJsfqppV9Z3dNfeyQ=="],
|
||||
"@honcho-ai/sdk": ["@honcho-ai/sdk@1.6.0", "", { "dependencies": { "@honcho-ai/core": "^1.6.1", "@types/node": "^24.0.1", "zod": "4.0.0" } }, "sha512-6HSjTidVwchEWw18p5Gqp4e2/I1Um0EppTZYZ22+hG1UemKRcJX+VDRvlu5ja8inD/WWYTEOJ/HBSdT8OC9biw=="],
|
||||
|
||||
"@img/sharp-darwin-arm64": ["@img/sharp-darwin-arm64@0.33.5", "", { "optionalDependencies": { "@img/sharp-libvips-darwin-arm64": "1.0.4" }, "os": "darwin", "cpu": "arm64" }, "sha512-UT4p+iz/2H4twwAoLCqfA9UH5pI6DggwKEGuaPy7nCVQ8ZsiY5PIcrRvD1DzuY3qYL07NtIQcWnBSY/heikIFQ=="],
|
||||
|
||||
|
|
@ -247,8 +246,6 @@
|
|||
|
||||
"ohash": ["ohash@2.0.11", "", {}, "sha512-RdR9FQrFwNBNXAr4GixM8YaRZRJ5PUWbKYbE5eOsrwAjJW0q2REGcf79oYPsLyskQCZG1PLN+S/K1V00joZAoQ=="],
|
||||
|
||||
"only-allow": ["only-allow@1.2.1", "", { "dependencies": { "which-pm-runs": "^1.1.0" }, "bin": { "only-allow": "bin.js" } }, "sha512-M7CJbmv7UCopc0neRKdzfoGWaVZC+xC1925GitKH9EAqYFzX9//25Q7oX4+jw0tiCCj+t5l6VZh8UPH23NZkMA=="],
|
||||
|
||||
"path-to-regexp": ["path-to-regexp@6.3.0", "", {}, "sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ=="],
|
||||
|
||||
"pathe": ["pathe@2.0.3", "", {}, "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w=="],
|
||||
|
|
@ -283,8 +280,6 @@
|
|||
|
||||
"whatwg-url": ["whatwg-url@5.0.0", "", { "dependencies": { "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" } }, "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw=="],
|
||||
|
||||
"which-pm-runs": ["which-pm-runs@1.1.0", "", {}, "sha512-n1brCuqClxfFfq/Rb0ICg9giSZqCS+pLtccdag6C2HyufBrh3fBOiy9nb6ggRMvWOVH5GrdJskj5iGTZNxd7SA=="],
|
||||
|
||||
"workerd": ["workerd@1.20250712.0", "", { "optionalDependencies": { "@cloudflare/workerd-darwin-64": "1.20250712.0", "@cloudflare/workerd-darwin-arm64": "1.20250712.0", "@cloudflare/workerd-linux-64": "1.20250712.0", "@cloudflare/workerd-linux-arm64": "1.20250712.0", "@cloudflare/workerd-windows-64": "1.20250712.0" }, "bin": { "workerd": "bin/workerd" } }, "sha512-7h+k1OxREpiZW0849g0uQNexRWMcs5i5gUGhJzCY8nIx6Tv4D/ndlXJ47lEFj7/LQdp165IL9dM2D5uDiedZrg=="],
|
||||
|
||||
"wrangler": ["wrangler@4.26.0", "", { "dependencies": { "@cloudflare/kv-asset-handler": "0.4.0", "@cloudflare/unenv-preset": "2.4.1", "blake3-wasm": "2.1.5", "esbuild": "0.25.4", "miniflare": "4.20250712.2", "path-to-regexp": "6.3.0", "unenv": "2.0.0-rc.17", "workerd": "1.20250712.0" }, "optionalDependencies": { "fsevents": "~2.3.2" }, "peerDependencies": { "@cloudflare/workers-types": "^4.20250712.0" }, "optionalPeers": ["@cloudflare/workers-types"], "bin": { "wrangler": "bin/wrangler.js", "wrangler2": "bin/wrangler.js" } }, "sha512-EXuwyWlgYQZv6GJlyE0lVGk9hHqASssuECECT1XC5aIijTwNLQhsj/TOZ0hKSFlMbVr1E+OAdevAxd0kaF4ovA=="],
|
||||
|
|
@ -295,10 +290,12 @@
|
|||
|
||||
"youch-core": ["youch-core@0.3.3", "", { "dependencies": { "@poppinss/exception": "^1.2.2", "error-stack-parser-es": "^1.0.5" } }, "sha512-ho7XuGjLaJ2hWHoK8yFnsUGy2Y5uDpqSTq1FkHLK4/oqKtyUU1AFbOOxY4IpC9f0fTLjwYbslUz0Po5BpD1wrA=="],
|
||||
|
||||
"zod": ["zod@3.22.3", "", {}, "sha512-EjIevzuJRiRPbVH4mGc8nApb/lVLKVpmUhAaR5R5doKGfAnGJ6Gr3CViAVjP+4FWSxCsybeWQdcgCtbX+7oZug=="],
|
||||
"zod": ["zod@4.0.0", "", {}, "sha512-9diLdTPc/L7w/5jI4C3gHYNiGHDV9IZYxo1e5LSD8cabi65WVTWWb+g2BGPEpUUCOxR4D+6O5B0AzyMdUAXwrw=="],
|
||||
|
||||
"@honcho-ai/core/@types/node": ["@types/node@18.19.120", "", { "dependencies": { "undici-types": "~5.26.4" } }, "sha512-WtCGHFXnVI8WHLxDAt5TbnCM4eSE+nI0QN2NJtwzcgMhht2eNz6V9evJrk+lwC8bCY8OWV5Ym8Jz7ZEyGnKnMA=="],
|
||||
|
||||
"miniflare/zod": ["zod@3.22.3", "", {}, "sha512-EjIevzuJRiRPbVH4mGc8nApb/lVLKVpmUhAaR5R5doKGfAnGJ6Gr3CViAVjP+4FWSxCsybeWQdcgCtbX+7oZug=="],
|
||||
|
||||
"@honcho-ai/core/@types/node/undici-types": ["undici-types@5.26.5", "", {}, "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA=="],
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,13 +9,13 @@
|
|||
"bun": ">=1.2.0"
|
||||
},
|
||||
"scripts": {
|
||||
"preinstall": "node -e \"if(process.env.npm_config_user_agent?.includes('npm')){console.error('❌ Please use bun instead of npm!\\n📦 Run: bun install\\n🌐 Install bun: https://bun.sh/');process.exit(1)}\"",
|
||||
"preinstall": "node -e \"const ua=process.env.npm_config_user_agent||'';if(ua.includes('npm')&&!ua.includes('bun')){console.error('❌ Please use bun instead of npm!\\n📦 Run: bun install\\n🌐 Install bun: https://bun.sh/');process.exit(1)}\"",
|
||||
"dev": "wrangler dev",
|
||||
"deploy": "wrangler deploy",
|
||||
"deploy:staging": "wrangler deploy --env staging"
|
||||
},
|
||||
"dependencies": {
|
||||
"@honcho-ai/sdk": "^1.2.1"
|
||||
"@honcho-ai/sdk": "^1.6.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@cloudflare/workers-types": "^4.20241002.0",
|
||||
|
|
|
|||
2633
mcp/worker.ts
2633
mcp/worker.ts
File diff suppressed because it is too large
Load Diff
|
|
@ -1,6 +1,6 @@
|
|||
[project]
|
||||
name = "honcho"
|
||||
version = "2.5.0"
|
||||
version = "2.5.1"
|
||||
description = "Honcho Server"
|
||||
authors = [
|
||||
{name = "Plastic Labs", email = "hello@plasticlabs.ai"},
|
||||
|
|
@ -33,7 +33,7 @@ dependencies = [
|
|||
"typing-extensions>=4.11.0",
|
||||
"prometheus-client>=0.20.0",
|
||||
"json-repair>=0.49.0",
|
||||
"redis>=6.0.0",
|
||||
"redis>=7.0.0,<8.0.0",
|
||||
"cashews[redis]==7.4.1",
|
||||
]
|
||||
[tool.uv]
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ authors = [
|
|||
{ name = "Plastic Labs", email = "hello@plasticlabs.ai" },
|
||||
]
|
||||
dependencies = [
|
||||
"honcho-core>=1.7.0",
|
||||
"honcho-core>=1.8.0",
|
||||
"httpx>=0.28.0, <1",
|
||||
"pydantic>=2.0.0, <3",
|
||||
"typing-extensions>=4.12.0; python_version < \"3.12\"",
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
"": {
|
||||
"name": "@honcho-ai/sdk",
|
||||
"dependencies": {
|
||||
"@honcho-ai/core": "^1.7.0",
|
||||
"@honcho-ai/core": "^1.8.0",
|
||||
"@types/node": "^24.0.1",
|
||||
"zod": "4.0.0",
|
||||
},
|
||||
|
|
@ -106,7 +106,7 @@
|
|||
|
||||
"@biomejs/cli-win32-x64": ["@biomejs/cli-win32-x64@2.3.8", "", { "os": "win32", "cpu": "x64" }, "sha512-RguzimPoZWtBapfKhKjcWXBVI91tiSprqdBYu7tWhgN8pKRZhw24rFeNZTNf6UiBfjCYCi9eFQs/JzJZIhuK4w=="],
|
||||
|
||||
"@honcho-ai/core": ["@honcho-ai/core@1.7.0", "", { "dependencies": { "@types/node": "^18.11.18", "@types/node-fetch": "^2.6.4", "abort-controller": "^3.0.0", "agentkeepalive": "^4.2.1", "form-data-encoder": "1.7.2", "formdata-node": "^4.3.2", "node-fetch": "^2.6.7" } }, "sha512-ZZsRlz0DgXaWj5z81KKcw4dLlwSxHqsxuG/Gb9vaozqJa8SSj09IGMm3kJjRTxNOD/AhHxOxAX3l6WEq4VZL5g=="],
|
||||
"@honcho-ai/core": ["@honcho-ai/core@1.8.0", "", { "dependencies": { "@types/node": "^18.11.18", "@types/node-fetch": "^2.6.4", "abort-controller": "^3.0.0", "agentkeepalive": "^4.2.1", "form-data-encoder": "1.7.2", "formdata-node": "^4.3.2", "node-fetch": "^2.6.7" } }, "sha512-qxBNoXLezH8yx4iBoz4Bsxkm9zp4Gm1fNwuP8gHRdSelxhR0dXpvLffx8B5V0XFWsx+SfPaJFyaKw0X2sYMwLA=="],
|
||||
|
||||
"@istanbuljs/load-nyc-config": ["@istanbuljs/load-nyc-config@1.1.0", "", { "dependencies": { "camelcase": "^5.3.1", "find-up": "^4.1.0", "get-package-type": "^0.1.0", "js-yaml": "^3.13.1", "resolve-from": "^5.0.0" } }, "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ=="],
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
"test:coverage": "jest --coverage"
|
||||
},
|
||||
"dependencies": {
|
||||
"@honcho-ai/core": "^1.7.0",
|
||||
"@honcho-ai/core": "^1.8.0",
|
||||
"@types/node": "^24.0.1",
|
||||
"zod": "4.0.0"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -472,9 +472,9 @@ class CertaintyReasoner:
|
|||
]
|
||||
accumulate_metric(
|
||||
f"deriver_{self.ctx[-1].id}_{self.observer}",
|
||||
"new_peer_card"
|
||||
"updated_peer_card"
|
||||
if self.observer == self.observed
|
||||
else f"new_{self.observed}_peer_card",
|
||||
else f"updated_{self.observed}_peer_card",
|
||||
"\n".join(new_peer_card),
|
||||
"blob",
|
||||
)
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ from src.utils.queue_payload import DreamPayload
|
|||
from src.utils.representation import (
|
||||
ExplicitObservation,
|
||||
Representation,
|
||||
flatten_message_ids,
|
||||
)
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
|
@ -202,7 +203,7 @@ async def _consolidate_cluster(
|
|||
# NOTE: other kinds of observations here in the future
|
||||
|
||||
metadata = schemas.DocumentMetadata(
|
||||
message_ids=obs.message_ids,
|
||||
message_ids=flatten_message_ids(obs.message_ids),
|
||||
message_created_at=format_datetime_utc(obs.created_at),
|
||||
premises=premises,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ app = FastAPI(
|
|||
title="Honcho API",
|
||||
summary="The Identity Layer for the Agentic World",
|
||||
description="""Honcho is a platform for giving agents user-centric memory and social cognition""",
|
||||
version="2.5.0",
|
||||
version="2.5.1",
|
||||
contact={
|
||||
"name": "Plastic Labs",
|
||||
"url": "https://honcho.dev",
|
||||
|
|
|
|||
|
|
@ -8,6 +8,40 @@ from src import models
|
|||
from src.utils.formatting import parse_datetime_iso
|
||||
|
||||
|
||||
def flatten_message_ids(
|
||||
message_ids: list[int] | list[list[int]] | list[tuple[int, int]],
|
||||
) -> list[int]:
|
||||
"""
|
||||
Flatten message_ids that may be in old tuple format or nested list format.
|
||||
|
||||
This handles backwards compatibility with the old schema where message_ids
|
||||
was list[tuple[int, int]] representing ranges, and the new schema where
|
||||
it's list[int] representing individual message IDs.
|
||||
|
||||
Args:
|
||||
message_ids: Either a flat list of ints, nested list, or list of tuples
|
||||
|
||||
Returns:
|
||||
A flat list of unique message IDs, sorted
|
||||
|
||||
Examples:
|
||||
[1, 2, 3] -> [1, 2, 3]
|
||||
[[1, 2], [3, 4]] -> [1, 2, 3, 4]
|
||||
[(105, 105)] -> [105]
|
||||
[[105, 105]] -> [105]
|
||||
"""
|
||||
result: list[int] = []
|
||||
for item in message_ids:
|
||||
if isinstance(item, (list | tuple)):
|
||||
# Nested list or tuple - flatten it
|
||||
result.extend(item)
|
||||
else:
|
||||
# Already flat
|
||||
result.append(item)
|
||||
# Remove duplicates and sort
|
||||
return sorted(set(result))
|
||||
|
||||
|
||||
class ObservationMetadata(BaseModel):
|
||||
created_at: datetime
|
||||
message_ids: list[int]
|
||||
|
|
@ -267,7 +301,9 @@ class Representation(BaseModel):
|
|||
doc.internal_metadata, doc.created_at
|
||||
),
|
||||
content=doc.content,
|
||||
message_ids=doc.internal_metadata.get("message_ids", []),
|
||||
message_ids=flatten_message_ids(
|
||||
doc.internal_metadata.get("message_ids", [])
|
||||
),
|
||||
session_name=doc.session_name,
|
||||
)
|
||||
for doc in documents
|
||||
|
|
@ -279,7 +315,9 @@ class Representation(BaseModel):
|
|||
doc.internal_metadata, doc.created_at
|
||||
),
|
||||
conclusion=doc.content,
|
||||
message_ids=doc.internal_metadata.get("message_ids", []),
|
||||
message_ids=flatten_message_ids(
|
||||
doc.internal_metadata.get("message_ids", [])
|
||||
),
|
||||
session_name=doc.session_name,
|
||||
premises=doc.internal_metadata.get("premises", []),
|
||||
)
|
||||
|
|
|
|||
20
uv.lock
20
uv.lock
|
|
@ -1,5 +1,5 @@
|
|||
version = 1
|
||||
revision = 2
|
||||
revision = 3
|
||||
requires-python = ">=3.10"
|
||||
resolution-markers = [
|
||||
"python_full_version >= '3.13'",
|
||||
|
|
@ -710,7 +710,7 @@ wheels = [
|
|||
|
||||
[[package]]
|
||||
name = "honcho"
|
||||
version = "2.5.0"
|
||||
version = "2.5.1"
|
||||
source = { virtual = "." }
|
||||
dependencies = [
|
||||
{ name = "alembic" },
|
||||
|
|
@ -782,7 +782,7 @@ requires-dist = [
|
|||
{ name = "pydantic-settings", specifier = ">=2.10.1" },
|
||||
{ name = "pyjwt", specifier = ">=2.10.0" },
|
||||
{ name = "python-dotenv", specifier = ">=1.0.0" },
|
||||
{ name = "redis", specifier = ">=6.0.0" },
|
||||
{ name = "redis", specifier = ">=7.0.0,<8.0.0" },
|
||||
{ name = "rich", specifier = ">=13.7.1" },
|
||||
{ name = "sentry-sdk", extras = ["anthropic", "fastapi", "sqlalchemy"], specifier = ">=2.3.1" },
|
||||
{ name = "sqlalchemy", specifier = ">=2.0.30" },
|
||||
|
|
@ -826,7 +826,7 @@ dev = [
|
|||
|
||||
[package.metadata]
|
||||
requires-dist = [
|
||||
{ name = "honcho-core", specifier = ">=1.7.0" },
|
||||
{ name = "honcho-core", specifier = ">=1.8.0" },
|
||||
{ name = "httpx", specifier = ">=0.28.0,<1" },
|
||||
{ name = "pydantic", specifier = ">=2.0.0,<3" },
|
||||
{ name = "typing-extensions", marker = "python_full_version < '3.12'", specifier = ">=4.12.0" },
|
||||
|
|
@ -837,7 +837,7 @@ dev = [{ name = "ruff", specifier = ">=0.11.13" }]
|
|||
|
||||
[[package]]
|
||||
name = "honcho-core"
|
||||
version = "1.7.0"
|
||||
version = "1.8.0"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "anyio" },
|
||||
|
|
@ -847,9 +847,9 @@ dependencies = [
|
|||
{ name = "sniffio" },
|
||||
{ name = "typing-extensions" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/9e/75/0185a8b1c85d6947b3c7fe1a3ee5793fdedb944aec4798a370fcc27ec34f/honcho_core-1.7.0.tar.gz", hash = "sha256:b2eac28bc8b47ef8a1da404a1fce12180f12a8ea014f2bd68ad95d6e37bf90c4", size = 145919, upload-time = "2025-12-10T16:05:09.387Z" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/c8/ea/c0949bbac5a9f20625bdb152b7da2350e89ffc15b5862cd6094b464cde14/honcho_core-1.8.0.tar.gz", hash = "sha256:ffe0840639651640722ad0ed38d193cc9402b077dac3e6726ac7be551398d952", size = 142469, upload-time = "2025-12-15T19:27:59.555Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/6b/4d/74611a5055116ae683b5b256349f23913b2e35cc2ea2d96c28a5ddf23e76/honcho_core-1.7.0-py3-none-any.whl", hash = "sha256:2d9b31b0439513518e3156a798f5096fd92ab71fe46bc40b4b5507e23dd1116f", size = 148271, upload-time = "2025-12-10T16:05:07.964Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/4a/9a/5aba73353c7e70d331a21e01a931c951c5bd8688fb25e5fc318517f2adf9/honcho_core-1.8.0-py3-none-any.whl", hash = "sha256:30a44b7d421328dfac015e8a6ecbe09c89b6cac9f3a913262244e7d15698a8a8", size = 140580, upload-time = "2025-12-15T19:27:58.562Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -2015,14 +2015,14 @@ wheels = [
|
|||
|
||||
[[package]]
|
||||
name = "redis"
|
||||
version = "6.4.0"
|
||||
version = "7.1.0"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "async-timeout", marker = "python_full_version < '3.11.3'" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/0d/d6/e8b92798a5bd67d659d51a18170e91c16ac3b59738d91894651ee255ed49/redis-6.4.0.tar.gz", hash = "sha256:b01bc7282b8444e28ec36b261df5375183bb47a07eb9c603f284e89cbc5ef010", size = 4647399, upload-time = "2025-08-07T08:10:11.441Z" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/43/c8/983d5c6579a411d8a99bc5823cc5712768859b5ce2c8afe1a65b37832c81/redis-7.1.0.tar.gz", hash = "sha256:b1cc3cfa5a2cb9c2ab3ba700864fb0ad75617b41f01352ce5779dabf6d5f9c3c", size = 4796669, upload-time = "2025-11-19T15:54:39.961Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/e8/02/89e2ed7e85db6c93dfa9e8f691c5087df4e3551ab39081a4d7c6d1f90e05/redis-6.4.0-py3-none-any.whl", hash = "sha256:f0544fa9604264e9464cdf4814e7d4830f74b165d52f2a330a760a88dd248b7f", size = 279847, upload-time = "2025-08-07T08:10:09.84Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/89/f0/8956f8a86b20d7bb9d6ac0187cf4cd54d8065bc9a1a09eb8011d4d326596/redis-7.1.0-py3-none-any.whl", hash = "sha256:23c52b208f92b56103e17c5d06bdc1a6c2c0b3106583985a76a18f83b265de2b", size = 354159, upload-time = "2025-11-19T15:54:38.064Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
|
|||
Loading…
Reference in New Issue