Giter VIP home page Giter VIP logo

honcho's Introduction

🫡 Honcho

Static Badge Discord GitHub License GitHub Repo stars X (formerly Twitter) URL

Honcho is a platform for making AI agents and LLM powered applications that are personalized to their end users.

Read about the motivation of this project here.

Read the user documenation here

Table of Contents

Project Structure

The Honcho repo is a monorepo containing the server/API that manages database interactions and storing data about an application's state along with the python sdk for interacting with the API.

The folders are structured as follows:

  • api/ - contains a FastAPI application that provides user context management routes
  • sdk/ - contains the code for the python sdk and package hosted on PyPI
  • example/ - contains example code for different use cases of honcho

This project utilizes poetry for dependency management

A separate changelog is managed for the sdk and api in their respective directories.

Usage

API

Docker

The API can be run using docker-compose. The docker-compose.yml.example file can be copied to docker-compose.yml and the environment variables can be set in the .env file.

cd honcho/api
cp docker-compose.yml.example docker-compose.yml
[ update the file with openai key and other wanted environment variables ]
docker compose up -d

Manually

Docker

The API can be run using docker-compose. The docker-compose.yml.example file can be copied to docker-compose.yml and the environment variables can be set in the .env file.

cd honcho/api
cp docker-compose.yml.example docker-compose.yml
[ update the file with openai key and other wanted environment variables ]
docker compose up -d

Manually

The API can be run either by installing the necessary dependencies and then specifying the appropriate environment variables.

  1. Create a virtualenv and install the API's dependencies
cd honcho/api/ # change to the api directory
poetry shell # Activate virutal environment
poetry install # install dependencies
  1. Copy the .env.template file and specify the type of database and connection_uri. For testing sqlite is fine. The below example uses an in-memory sqlite database. in-memory sqlite database.

Honcho has been tested with Postgresql and PGVector

DATABASE_TYPE=postgres
CONNECTION_URI=postgresql://testuser:testpwd@localhost:5432/honcho
  1. launch a postgresd with pgvector enabled with docker-compose
cd honcho/api/local
docker-compose up -d
  1. Run the API via uvicorn
cd honcho/api # change to the api directory
poetry shell # Activate virtual environment if not already enabled
python -m uvicorn src.main:app --reload

Deploy on Fly

The API can also be deployed on fly.io. Follow the Fly.io Docs to setup your environment and the flyctl. flyctl.

Once flyctl is set up use the following commands to launch the application:

cd honcho/api
flyctl launch --no-deploy # Follow the prompts and edit as you see fit
cat .env | flyctl secrets import # Load in your secrets
flyctl deploy # Deploy with appropriate environment variables

Client SDK

Install the honcho client sdk from a python project with the following command:

pip install honcho-ai

alternatively if you are using poetry run:

poetry add honcho-ai

checkout the SDK Reference for a detailed look at the different methods and how to use them.

Also, check out theexample folder for examples of how to use the sdk checkout the SDK Reference for a detailed look at the different methods and how to use them.

Also, check out theexample folder for examples of how to use the sdk

Use Locally

For local development of the sdk you can add the local directory as a package using poetry with the following commands.

poetry add --editable ./{path_to_honcho}/honcho/sdk

See more information here

Contributing

This project is completely open source and welcomes any and all open source contributions. The workflow for contributing is to make a fork of the repository. You can claim an issue in the issues tab or start a new thread to indicate a feature or bug fix you are working on. indicate a feature or bug fix you are working on.

Once you have finished your contribution make a PR pointed at the staging branch, and it will be reviewed by a project manager. Feel free to join us in our discord to discuss your changes or get help. help.

Once your changes are accepted and merged into staging they will undergo a period of live testing before entering the upstream into main

License

Honcho is licensed under the AGPL-3.0 License. Learn more at the License file

honcho's People

Contributors

vvoruganti avatar hyusap avatar vintrocode avatar jacobvm04 avatar sguha00 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.