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:Reasoning Level
Usereasoning_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:Scoping to Sessions
By default the chat endpoint reasons over everything Honcho knows about the peer. Passsession (session_id on the REST body) to restrict it to one
session:
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 asresponse_format and the answer is guaranteed to conform to it:
Evidence
Passinclude_evidence to get back the conclusions and messages the agent read while answering, alongside the tools it called:
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?”
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:
{"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.
filters or target.
Streaming
Usechat_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 callhoncho.chat(query):
- Honcho prefetches an orientation overview: workspace stats, the most active peers, and their peer cards. This is a routing aid, not the corpus.
- The agent is required to make at least one tool call before answering, so the overview alone is never mistaken for the whole workspace.
- Message search runs workspace-wide and reveals which peers discussed a topic. Conclusion search stays pair-scoped: the agent names an
observerandobservedper call, and results come back attributed as[observer->observed]. - The agent synthesizes a grounded answer, citing which peers the evidence came from.
(observer, observed) pair.
Authentication
Workspace chat requires a workspace- or admin-level key. Peer- and session-scoped keys are rejected with401 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 callpeer.chat(query):
- Honcho searches through the peer’s peer card and representation—conclusions drawn from reasoning over their messages
- Retrieves conclusions semantically relevant to your query
- Combines them with segments of source messages, if needed, to gather more context
- Synthesizes them into a coherent natural language response to your query
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. Askinghoncho.chat() about a single known peer works, but costs a routing step that peer.chat() skips.
Combine with context()
Usecontext() for conversation context and peer.chat() for specific insights. They complement each other.
For more ideas on using the chat endpoint, see our guides.