Skip to main content
The Chat endpoint 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. Think of it as agent-to-agent communication. There are two ways to ask: Most applications start with peer chat. Jump to Workspace Chat when the question spans more than one peer.

Basic Usage

The simplest way to use the chat endpoint is to ask a question and get a text response:
Peer chat 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 same levels apply to workspace chat. 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.

Scoping to Sessions

By default the chat endpoint reasons over everything Honcho knows about the peer. Pass session (session_id on the REST body) to restrict it to one session:
To restrict a request to a set of sessions, use the session allowlist — a constrained filters body on the endpoint. See Scoping Recall to Sessions for the accepted shapes and for what an allowlist changes about the answer. Pass scope="therapy" to answer from that scope’s own representation of the peer. A list (scope=["therapy", "intake"]) is an allowlist of those scopes’ sessions, not named-scope depth. honcho.chat(scope=) is always the allowlist arm, even with one name. Details are on the scopes page.

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.

Evidence

Pass include_evidence to get back the conclusions and messages the agent read while answering, alongside the tools it called:
Evidence is collated from what the agent read rather than reported by the model, so it lists everything that was available to the answer rather than only what the answer used. See Evidence for the full shape, streaming behavior, and what the trade-off costs you.

Workspace Chat

honcho.chat() asks a question of the whole workspace. There is no observer peer and no target: the agent orients itself with workspace stats and the most active peers, works out which peers are relevant to the question, and then reads their memory pair by pair.

When to Use It

Reach for workspace chat when the question is about more than one peer, or when you don’t know which peer holds the answer:
  • “What themes come up across all users this week?”
  • “Which peers have mentioned the billing migration?”
  • “Where do Alice and Bob disagree?”
  • “What does this workspace know about deployment incidents?”
Stay with peer.chat() when you need a perspective (what one peer knows about another), when you’re personalizing for a single user, or when the caller only holds a peer-scoped key.

Asking the Workspace

chat() lives on the client, not on a peer:
The response body is {"content": "..."}, or {"content": null} when nothing relevant was found. The SDKs return the string directly (None / null for no answer).

Narrowing Recall

Two options narrow what the agent can read. They are mutually exclusive. session (session_id on the REST body) narrows message tools to one session. Conclusion recall is unaffected.
scope restricts recall to the union of the named scopes’ member sessions. On workspace chat this is always the allowlist arm, even for a single name, because there is no observer to swap. A scope with no member sessions recalls nothing rather than everything.
Workspace chat does not accept filters or target.

Streaming

Use chat_stream / chatStream for incremental output. The stream yields text chunks; the REST endpoint sends text/event-stream when stream is true.

Workspace Structured Outputs

response_format works the same way as on peer chat. In Python, passing a Pydantic model returns a parsed instance; passing a raw JSON Schema returns a JSON string. The TypeScript client accepts a JSON Schema object and returns the JSON string for you to parse.

How Workspace Chat Answers

When you call honcho.chat(query):
  1. Honcho prefetches an orientation overview: workspace stats, the most active peers, and their peer cards. This is a routing aid, not the corpus.
  2. The agent is required to make at least one tool call before answering, so the overview alone is never mistaken for the whole workspace.
  3. Message search runs workspace-wide and reveals which peers discussed a topic. Conclusion search stays pair-scoped: the agent names an observer and observed per call, and results come back attributed as [observer->observed].
  4. The agent synthesizes a grounded answer, citing which peers the evidence came from.
Keeping conclusion search pair-scoped avoids diluting retrieval with a workspace-flat top-k, and matches how memory is stored: one collection per (observer, observed) pair.

Authentication

Workspace chat requires a workspace- or admin-level key. Peer- and session-scoped keys are rejected with 401 regardless of the other options. See Manage API Keys for scoping rules.

Peer Chat vs Workspace Chat

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:

Team Digests

Use workspace chat where the unit of interest is the group rather than one user:

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. Workspace chat follows the same loop with a different starting point; see How Workspace Chat Answers.

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.

Pick the right entry point

Peer chat for one peer’s perspective, workspace chat for questions that span peers. Asking honcho.chat() about a single known peer works, but costs a routing step that peer.chat() skips.

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.