Use this file to discover all available pages before exploring further.
For production-level use, Honcho offers two powerful ways to leverage ambient personalization: our managed platform and our open source solution. Read further if you want to explore the quickstart demo.
Honcho Platform
Fully managed, hassle-free solution with one-click deployment
Have your project use Honcho’s ambient personalization capabilities in just a few steps. No signup required!
By default, the SDK uses the demo server hosted at demo.honcho.dev. The demo server is meant for quick experimentation and the data is cleared on a regular basis. Do not use for production applications.For production use:
import osfrom honcho import Honcho# Production environment with API keyhoncho = Honcho( api_key=os.environ["HONCHO_API_KEY"], environment="production", # Create a workspace, otherwise set to "default" # workspaceId="your-workspace-id")
Add some conversation messages. Honcho automatically learns from these interactions:
session.add_messages([ alice.message("Hi Bob, how are you?"), bob.message("I'm good, thank you!"), alice.message("What are you doing today after work?"), bob.message("I'm going to the gym! I've been trying to get back in shape."), alice.message("That's great! I should probably start exercising too."), bob.message("You should! I find that evening workouts help me relax."),])
Now ask Honcho what it’s learned - this is where the magic happens:
# Ask what Bob is likeresponse = bob.chat("Tell me about Bob's interests and habits")print(response)# Returns rich context like:# "Bob is health-conscious and has been working on getting back in shape.# He regularly goes to the gym, particularly in the evenings, and finds# exercise helps him relax. He's encouraging about fitness and willing# to share advice about workout routines."
import osfrom honcho import Honcho# Create your clienthoncho = Honcho( api_key=os.environ["HONCHO_API_KEY"], environment="production", # Create a workspace, otherwise set to "default" # workspaceId="your-workspace-id")# Get your Peersalice = honcho.peer("alice")bob = honcho.peer("bob")# Make a Session and add your Peerssession = honcho.session("session_1")session.add_peers([alice, bob])# Add messages sent by your Peerssession.add_messages([ alice.message("Hi Bob, how are you?"), bob.message("I'm good, thank you!"), alice.message("What are you doing today after work?"), bob.message("I'm going to the gym! I've been trying to get back in shape."), alice.message("That's great! I should probably start exercising too."), bob.message("You should! I find that evening workouts help me relax."),])# Get insights about your Peersresponse = bob.chat("Tell me about Bob's interests and habits")print(response)# Returns rich context like:# "Bob is health-conscious and has been working on getting back in shape.# He regularly goes to the gym, particularly in the evenings, and finds# exercise helps him relax. He's encouraging about fitness and willing# to share advice about workout routines."
You just got through building a simple conversation between two people, Alice
and Bob. We:
Set up our connection to Honcho.
Setup who the participants of our conversation are, these are called Peers.
Made a Session and added our Peers to it.
Sent messages from our Peers
Chat with Honcho to get insights about one of the Peers in the conversation
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.