Skip to content

Commit

Permalink
Anthropic Migration (#72)
Browse files Browse the repository at this point in the history
* ready to test deriver

* prompts ready for testing

* compare entire list, don't loop through facts one by one

* parse xml, batch process ai query docs

* timing works

* session id is writing to csv now

* ignore timing logs

* infinite backrooms-inpsired prompts

* yousim/ib inspired prompts v0

* accept incoming changes on agent.py

* dialectic to sonnet for now

* remove timing, use py-spy

* cleanup from timing removal

* remove extra timing stuff

* Route for User LeveL Metamessages

* functional state

* chore: Clean up artifacts

* fix(deriver) update database calls for new schema and payload

* chore(docs) Update Honcho Version

---------

Co-authored-by: Vineeth Voruganti <[email protected]>
  • Loading branch information
vintrocode and VVoruganti authored Oct 18, 2024
1 parent 6d5439a commit 487ec43
Show file tree
Hide file tree
Showing 24 changed files with 9,431 additions and 1,272 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -175,3 +175,5 @@ cython_debug/
supabase/

docs/node_modules

timing_logs.csv
50 changes: 25 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# 🫡 Honcho
![Static Badge](https://img.shields.io/badge/Version-0.0.11-blue)

![Static Badge](https://img.shields.io/badge/Version-0.0.12-blue)
[![Discord](https://img.shields.io/discord/1016845111637839922?style=flat&logo=discord&logoColor=23ffffff&label=Plastic%20Labs&labelColor=235865F2)](https://discord.gg/plasticlabs)
[![arXiv](https://img.shields.io/badge/arXiv-2310.06983-b31b1b.svg)](https://arxiv.org/abs/2310.06983)
![GitHub License](https://img.shields.io/github/license/plastic-labs/honcho)
Expand All @@ -8,7 +9,6 @@
[![PyPI version](https://img.shields.io/pypi/v/honcho-ai.svg)](https://pypi.org/project/honcho-ai/)
[![NPM version](https://img.shields.io/npm/v/honcho-ai.svg)](https://npmjs.org/package/honcho-ai)


Honcho is a platform for making AI agents and LLM powered applications that are personalized
to their end users. It leverages the inherent theory-of-mind capabilities of
LLMs to cohere to user psychology over time.
Expand All @@ -22,34 +22,34 @@ Read the user documentation [here](https://docs.honcho.dev)
- [Project Structure](#project-structure)
- [Usage](#usage)
- [Architecture](#architecture)
- [Storage](#storage)
- [Insights](#insights)
- [Storage](#storage)
- [Insights](#insights)
- [License](#license)

## Project Structure

The Honcho project is split between several repositories with this one hosting
the core service logic. This is implemented as a FastAPI server/API to store
data about an application's state.
data about an application's state.

There are also client-sdks that are created using
[Stainless](https://www.stainlessapi.com/). Currently, there is a [Python](https://github.com/plastic-labs/honcho-python) and
[TypeScript/JavaScript](https://github.com/plastic-labs/honcho-node) SDK available.
[Stainless](https://www.stainlessapi.com/). Currently, there is a [Python](https://github.com/plastic-labs/honcho-python) and
[TypeScript/JavaScript](https://github.com/plastic-labs/honcho-node) SDK available.

Examples on how to use the SDK are located within each SDK repository. There is
also SDK example usage available in the [API Reference](https://docs.honcho.dev/api-reference/introduction)
along with various guides.
along with various guides.

## Usage

Currently, there is a demo server of Honcho running at https://demo.honcho.dev.
This server is not production ready and does not have an reliability guarantees.
It is purely there for evaluation purposes.
It is purely there for evaluation purposes.

A private beta for a tenant isolated production ready version of Honcho is
currently underway. If interested fill out this
[typeform](https://plasticlabs.typeform.com/honchobeta) and the Plastic Labs
team will reach out to onboard users.
team will reach out to onboard users.

Additionally, Honcho can be self-hosted for testing and evaluation purposes. See
[Contributing](./CONTRIBUTING.md) for more details on how to setup a local
Expand All @@ -58,18 +58,18 @@ version of Honcho.
## Architecture

The functionality of Honcho can be split into two different services: Storage
and Insights.
and Insights.

### Storage
### Storage

Honcho contains several different primitives used for storing application and
user data. This data is used for managing conversations, modeling user
psychology, building RAG applications, and more.
psychology, building RAG applications, and more.

The philosophy behind Honcho is to provide a platform that is user-centric and
easily scalable from a single user to a million.
easily scalable from a single user to a million.

Below is a mapping of the different primitives.
Below is a mapping of the different primitives.

```
Apps
Expand All @@ -82,7 +82,7 @@ Apps
```

Users familiar with APIs such as the OpenAI Assistants API will be familiar with
much of the mapping here.
much of the mapping here.

#### Apps

Expand All @@ -93,17 +93,17 @@ isolation data between use cases.
**Users**

Within an `App` everything revolves around a `User`. the `User` object
literally represent a user of an application.
literally represent a user of an application.

#### Sessions

The `Session` object represents a set of interactions a `User` has with an
`App`. Other application may refer to this as a thread or conversation.
`App`. Other application may refer to this as a thread or conversation.

**Messages**

The `Message` represents an atomic interaction of a `User` in a `Session`.
`Message`s are labed as either a `User` or AI message.
`Message`s are labed as either a `User` or AI message.

#### Metamessages

Expand All @@ -112,32 +112,32 @@ meant to be used to store intermediate inference from AI assistants or other
derived information that is separate from the main `User` `App` interaction
loop. For complicated prompting architectures like [metacognitive prompting](https://arxiv.org/abs/2310.06983)
metamessages can store thought and reflection steps along with having developer
information such as logs.
information such as logs.

Each `Metamessage` is associated with a `Message`. The convention we recommend
is to attach a `Metamessage` to the `Message` it was derived from or based on.
is to attach a `Metamessage` to the `Message` it was derived from or based on.

#### Collections

At a high level a `Collection` is a named group of `Documents`. Developers
familiar with RAG based applications will be familar with these. `Collection`s
store vector embedded data that developers and agents can retrieve against using
functions like cosine similarity.
functions like cosine similarity.

Developers can create multiple `Collection`s for a user for different purposes
such as modeling different personas, adding third-party data such as emails and
PDF files, and more.
PDF files, and more.

#### Documents

As stated before a `Document` is vector embedded data stored in a `Collection`.
As stated before a `Document` is vector embedded data stored in a `Collection`.

### Insights

The Insight functionality of Honcho is built on top of the Storage service. As
`Messages` and `Sessions` are created for a `User`, Honcho will asynchronously
reason about the `User`'s psychology to derive facts about them and store them
in a reserved `Collection`.
in a reserved `Collection`.

To read more about how this works read our [Research Paper](https://arxiv.org/abs/2310.06983)

Expand Down
Loading

0 comments on commit 487ec43

Please sign in to comment.