Skip to main content
The Chat endpoint (peer.chat()) is the natural language interface to Honcho’s reasoning. Instead of manually retrieving conclusions, your LLM can ask questions and get synthesized answers based on all the reasoning Honcho has done about a peer. Think of it as agent-to-agent communication.

Basic Usage

The simplest way to use the chat endpoint is to ask a question and get a text response:
The chat endpoint searches through the peer’s representation—all the conclusions Honcho has reasoned about them—and synthesizes a natural language answer.

Reasoning Level

Use reasoning_level to trade off speed against depth for a specific chat request. It is optional and defaults to low. Accepted values are minimal, low, medium, high, and max. The reasoning level controls which model the request is routed to, the tools used by the agent, the thinking budget, the maximum tool-iteration count, and output token limits.

Streaming Responses

For longer answers, use streaming to get incremental responses:
Streaming is useful for displaying real-time responses in chat interfaces or when asking complex questions that require longer answers.

Structured Outputs

When your application needs a machine-readable answer instead of prose, pass a schema as response_format and the answer is guaranteed to conform to it:
The agent runs its full reasoning loop either way — only the final answer is formatted to your schema. See Structured Outputs for the supported schema subset, streaming behavior, and best practices.

Integration Patterns

Dynamic Prompt Enhancement

Let your LLM decide what it needs to know, then inject that context into the next generation:

Conditional Logic

Use chat endpoint responses to drive application logic:

Preference Extraction

Extract specific preferences for personalization:

How Honcho Answers

When you call peer.chat(query):
  1. Honcho searches through the peer’s peer card and representation—conclusions drawn from reasoning over their messages
  2. Retrieves conclusions semantically relevant to your 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 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

Ask specific questions

Instead of “Tell me about the user”, ask “What communication style does the user prefer?” You’ll get more actionable answers.

Let your LLM formulate queries

The chat endpoint shines when your LLM decides what it needs to know. This creates dynamic, context-aware personalization. An excellent way to achieve this, if building an agent, is to give access to the Honcho chat endpoint as just another tool.

Use for runtime decisions

Don’t just use chat for LLM prompts - use it to drive application logic, routing, and feature flags based on user behavior.

Combine with context()

Use 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.