Learn the core primitives and the structure of Honcho
Honcho
instance and App
User
Session
for a User
.Collection
for a User
Message
s to a User
’s Session
.Metamessage
s to a User
(optional links to Session
, Message
)Document
s to a User
’s Collection
App
is the highest-level primitive in Honcho. It is the scope that all of your Users
are bound to.
User
object is the main interface for managing a User’s context. With it
you can interface with the User
’s Session
s and Collections
s directly.
Session
object is useful for organizing your interactions with User
s.
Different User
s can have different sessions enabling you to neatly segment user
context. It also accepts a location_id
parameter which can specifically
denote where users’ sessions are taking place.
Message
objects. You can append them to sessions.
This is pretty straightforward.
Metamessage
object for flexible context storage and construction. Each
Metamessage
is tied to a User
object via the required user_id
argument. Keeping
this separate from the core user-assistant message history ensures the
insights service running ambiently is doing so on authentic ground truth
We’ve found this particularly useful for storing intermediate inferences,
constructing very specific chat histories, and more. Metamessages can optionally be
attached to sessions and/or messages, so constructing historical context for inference is
as easy as possible.
Collections
are used to organize information about the User
. These can be
thought of as stores for more global data about the User
that spans sessions
while Metamessages
are local to a session and the message they are linked to.
Documents
are the individual facts that are stored in the Collection
. They
are stored as vector embeddings to allow for a RAG like interface. Using honcho
a developer can query a collection of documents using methods like cosine
similarity search