fix: reorder again

This commit is contained in:
vintro 2025-12-02 00:36:25 -05:00
parent 37e62c772c
commit 4eab8c03ff
No known key found for this signature in database
23 changed files with 267 additions and 183 deletions

View File

@ -32,7 +32,6 @@
{
"group": "Core Concepts",
"pages": [
"v2/documentation/reference/storage",
"v2/documentation/core-concepts/deriver",
"v2/documentation/core-concepts/representation"
]
@ -41,21 +40,37 @@
"group": "Features",
"pages": [
"v2/documentation/features/get-context",
"v2/documentation/features/dialectic-endpoint",
"v2/documentation/features/summarizer",
"v2/documentation/features/working-rep",
"v2/documentation/features/local-vs-global"
"v2/documentation/features/chat",
{
"group": "Advanced",
"pages": [
"v2/documentation/features/advanced/overview",
"v2/documentation/features/advanced/queue-status",
"v2/documentation/features/advanced/configuration",
"v2/documentation/features/advanced/summarizer",
"v2/documentation/features/advanced/search",
"v2/documentation/features/advanced/using-filters",
"v2/documentation/features/advanced/streaming-response"
]
}
]
},
{
"group": "Advanced",
"group": "Guides",
"pages": [
"v2/documentation/advanced/configuration",
"v2/documentation/advanced/queue-status",
"v2/documentation/advanced/streaming-response",
"v2/documentation/advanced/file-uploads",
"v2/documentation/advanced/search",
"v2/documentation/advanced/using-filters"
"v2/guides/file-uploads",
{
"group": "Integrations",
"pages": [
"v2/guides/integrations/mcp"
]
},
{
"group": "Migrations",
"pages": [
"v2/guides/migrations/mem0"
]
}
]
},
{
@ -67,26 +82,14 @@
}
]
},
{
"tab": "Integrations",
"groups": [
{
"group": "Getting Started",
"pages": ["v2/guides/overview", "v2/guides/mcp"]
},
{
"group": "Application Interfaces",
"pages": ["v2/guides/discord", "v2/guides/telegram"]
}
]
},
{
"tab": "Cookbooks",
"groups": [
{
"group": "Cookbooks",
"group": "Chatbots",
"pages": [
"v2/cookbooks/placeholder"
"v2/cookbooks/discord",
"v2/cookbooks/telegram"
]
}
]

View File

@ -1,63 +0,0 @@
---
title: "Cookbooks"
description: "Practical examples and patterns for using Honcho"
icon: "book"
sidebarTitle: "Overview"
---
# Honcho Cookbooks
Cookbooks provide practical, end-to-end examples of building applications with Honcho. Each cookbook demonstrates real-world patterns and best practices.
## Coming Soon
We're currently developing comprehensive cookbooks covering:
### Application Patterns
- Building a personalized chatbot
- Multi-agent conversation systems
- Context-aware RAG applications
- Long-term memory for autonomous agents
### Advanced Use Cases
- Psychological profiling for adaptive UX
- Social dynamics in multi-peer systems
- Custom theory-of-mind implementations
- Hybrid memory architectures
### Integration Examples
- Integrating with popular frameworks (LangChain, LlamaIndex)
- Combining Honcho with vector databases
- Using webhooks for real-time updates
- Scaling Honcho for production
## Available Resources
While we develop these cookbooks, check out our existing resources:
<CardGroup cols={2}>
<Card title="Integrations" icon="plug" href="/v2/guides/overview">
Framework-specific integration guides
</Card>
<Card title="Core Concepts" icon="brain" href="/v2/documentation/core-concepts/architecture">
Deep dive into Honcho's architecture
</Card>
<Card title="API Reference" icon="code" href="/v2/api-reference/introduction">
Complete API documentation
</Card>
<Card title="Community" icon="discord" href="https://discord.gg/plasticlabs">
Join our Discord for examples and help
</Card>
</CardGroup>
## Contributing
Have a great Honcho use case or pattern to share? We'd love to feature it in our cookbooks!
- Submit cookbook ideas via [GitHub Issues](https://github.com/plastic-labs/honcho/issues)
- Share your implementations in our [Discord community](https://discord.gg/plasticlabs)
- Contribute directly via [Pull Request](https://github.com/plastic-labs/honcho/pulls)
## Stay Updated
Follow our [changelog](/changelog/introduction) and [blog](https://blog.plasticlabs.ai) for announcements about new cookbooks and examples.

View File

@ -0,0 +1,5 @@
---
title: "Deriver"
icon: "gears"
sidebarTitle: "Deriver"
---

View File

@ -0,0 +1,5 @@
---
title: "Peer Representations"
icon: "user-magnifying-glass"
sidebarTitle: "Peer Representations"
---

View File

@ -0,0 +1,20 @@
---
title: "Advanced Features"
icon: "brain"
description: "Advanced configuration and monitoring options for Honcho"
sidebarTitle: "Overview"
---
Advanced features give you fine-grained control over Honcho's behavior and let you monitor system performance.
## Configuration & Monitoring
- [Queue Status](/v2/documentation/advanced/queue-status) - Monitor background processing and reasoning tasks
- [Configuration](/v2/documentation/advanced/configuration) - Configure reasoning models and behavior
- [Summarizer](/v2/documentation/features/summarizer) - Automatic session summarization
## Querying & Filtering
- [Search](/v2/documentation/advanced/search) - Search across peers, sessions, and messages
- [Filters](/v2/documentation/advanced/using-filters) - Filter queries with advanced parameters
- [Streaming Responses](/v2/documentation/advanced/streaming-response) - Stream dialectic responses in real-time

View File

@ -1,7 +1,7 @@
---
title: Queue Status
description: Learn how to check the status of the Deriver
icon: lines-leaning
icon: "lines-leaning"
---
Whenever `Messages` are stored in Honcho, a background process called the

View File

@ -1,7 +1,7 @@
---
title: 'Summarizer'
description: 'How Honcho creates summaries of conversations'
icon: 'code'
icon: 'compress'
---
Almost all agents require, in addition to personalization and memory, a way to quickly prime a context window with a summary of the conversation (in Honcho, this is equivalent to a `session`). The general strategy for summarization is to combine a list of recent messages verbatim with a compressed LLM-generated summary of the older messages not included. Implementing this correctly, in such a way that the resulting context is:

View File

@ -0,0 +1,201 @@
---
title: "Dialectic Endpoint"
description: "An endpoint for reasoning about your users"
sidebarTitle: "Dialectic Endpoint"
icon: "message-question"
---
The Dialectic endpoint (`peer.chat()`) is the natural language interface to Honcho's reasoning. Instead of manually retrieving facts or observations, 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.
## How It Works
Honcho builds a *representation*(TODO: link to concept page) for each peer--a collection of conclusions drawn from continuous reasoning over context. The most flexible way to query representations is through the `chat()` method. Some examples:
- "What is the user's preferred communication style?"
- "Has the user mentioned any dietary restrictions?"
- "What tasks does the user struggle with?"
Honcho searches the peer's representation, retrieves relevant conclusions, and synthesizes a natural language answer. It acts like a detective reasoning over evidence to make a case--your LLM asks the question, Honcho composes an answer from its conclusions.
## Basic Usage
The simplest way to use the Dialectic endpoint is to ask a question and get a text response:
<CodeGroup>
```python Python
from honcho import Honcho
honcho = Honcho()
peer = honcho.peer("user-123")
# Ask Honcho about the peer
query = "What is the user's favorite way of completing the task?"
answer = peer.chat(query)
print(answer)
# "Based on observations, the user prefers using keyboard shortcuts..."
```
```typescript TypeScript
import { Honcho } from '@honcho-ai/sdk';
const honcho = new Honcho({});
const peer = await honcho.peer("user-123");
// Ask Honcho about the peer
const query = "What is the user's favorite way of completing the task?";
const answer = await peer.chat(query);
console.log(answer);
// "Based on observations, the user prefers using keyboard shortcuts..."
```
</CodeGroup>
The Dialectic endpoint searches through the peer's representation--all the conclusions Honcho has reasoned about them--and synthesizes a natural language answer.
## Streaming Responses
For longer answers, use streaming to get incremental responses:
<CodeGroup>
```python Python
query = "What do we know about the user?"
response_stream = peer.chat(query, stream=True)
for chunk in response_stream.iter_text():
print(chunk, end="", flush=True)
```
```typescript TypeScript
const query = "What do we know about the user?";
const responseStream = await peer.chat(query, { stream: true });
for await (const chunk of responseStream.iter_text()) {
process.stdout.write(chunk);
}
```
</CodeGroup>
Streaming is useful for displaying real-time responses in chat interfaces or when asking complex questions that require longer answers.
## Integration Patterns
### Dynamic Prompt Enhancement
Let your LLM decide what it needs to know, then inject that context into the next generation:
<CodeGroup>
```python Python
# Your LLM generates a query based on the conversation
llm_query = "Does the user prefer formal or casual communication?"
# Get answer from Honcho
context = peer.chat(llm_query)
# Add to your next LLM prompt
enhanced_prompt = f"""
Context about the user: {context}
User message: {user_input}
Respond appropriately based on the context.
"""
```
```typescript TypeScript
// Your LLM generates a query based on the conversation
const llmQuery = "Does the user prefer formal or casual communication?";
// Get answer from Honcho
const context = await peer.chat(llmQuery);
// Add to your next LLM prompt
const enhancedPrompt = `
Context about the user: ${context}
User message: ${userInput}
Respond appropriately based on the context.
`;
```
</CodeGroup>
### Conditional Logic
Use Dialectic responses to drive application logic:
<CodeGroup>
```python Python
# Check if user has completed onboarding
onboarding_status = peer.chat("Has the user completed the onboarding flow?")
if "yes" in onboarding_status.lower():
# Show main interface
pass
else:
# Show onboarding
pass
```
```typescript TypeScript
// Check if user has completed onboarding
const onboardingStatus = await peer.chat("Has the user completed the onboarding flow?");
if (onboardingStatus.toLowerCase().includes("yes")) {
// Show main interface
} else {
// Show onboarding
}
```
</CodeGroup>
### Preference Extraction
Extract specific preferences for personalization:
<CodeGroup>
```python Python
# Get multiple insights
tone = peer.chat("What tone does the user prefer in responses?")
expertise = peer.chat("What is the user's level of technical expertise?")
goals = peer.chat("What are the user's main goals or objectives?")
# Use these to configure your agent's behavior
```
```typescript TypeScript
// Get multiple insights
const tone = await peer.chat("What tone does the user prefer in responses?");
const expertise = await peer.chat("What is the user's level of technical expertise?");
const goals = await peer.chat("What are the user's main goals or objectives?");
// Use these to configure your agent's behavior
```
</CodeGroup>
## How Honcho Answers
When you call `peer.chat(query)`:
1. Honcho searches through the peer's representation - conclusions drawn from reasoning over their messages
2. Retrieves conclusions semantically relevant to your query
3. Synthesizes them into a coherent natural language answer
4. Returns the answer to your application
The *deriver* runs continuously in the background, reasoning over new messages and updating representations. The Dialectic 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 Dialectic endpoint shines when your LLM decides what it needs to know. This creates dynamic, context-aware personalization.
### Use for runtime decisions
Don't just use Dialectic for LLM prompts - use it to drive application logic, routing, and feature flags based on user behavior.
### Combine with get_context()
Use `get_context()` for conversation context and `peer.chat()` for specific insights. They complement each other.
For more ideas on using the Dialectic endpoint, see our blog post on [flexible agent communication](https://blog.plasticlabs.ai/blog/Introducing-Honcho's-Dialectic-API#how-it-works).

View File

@ -1,87 +0,0 @@
---
title: "Dialectic Endpoint"
description: "An endpoint for reasoning about your users"
icon: "comments"
---
Honcho by default runs ambient inference on top of the `message` objects you store. Those messages serve as the ground truth upon which facts about the user are derived and stored. The **Dialectic Endpoint** is the natural language interface through which insights are synthesized from those facts. We believe [intellectual respect](https://blog.plasticlabs.ai/extrusions/Extrusion-02.24) for LLMs is paramount in building effective AI agents/apps. It follows that the LLM should know better than any human what would aid them in their generation task. Thus, the Dialectic endpoint exists for flexible agent-to-agent communication.
## Automatic Fact Derivation
On every message written to a session, an automatic callback is run that will reason about the conversation and store facts in a `collection` named `honcho`. This is a reserved `collection` specifically for the backend Honcho agent to interact with.
## Dialectic Endpoint
The Dialectic endpoint allows you to define logic enabling your agent to talk to our agent that automatically retrieves and synthesizes facts from the collection. You can use the response as part of your reasoning process for your agentadd it to your next prompt to inject critical context about the user.
This chat interface is exposed via the `peer.chat()` endpoint. It accepts a string query. Below is some example code on how this works.
## Prerequisites
<CodeGroup>
```python Python
from honcho import Honcho
# use the default workspace
honcho = Honcho()
# get/create a peer
peer = honcho.peer("demo-user")
# get/create a session
session = honcho.session("demo-session")
# (assuming some messages have been written to Honcho for the deriver to use)
```
```typescript TypeScript
import { Honcho } from '@honcho-ai/sdk';
// use the default workspace
const honcho = new Honcho({});
// get/create a peer
const peer = await honcho.peer('demo-user');
// get/create a session
const session = await honcho.session('demo-session');
// (assuming some messages have been written to Honcho for the deriver to use)
```
</CodeGroup>
## Static Dialectic Call
<CodeGroup>
```python Python
query = "What is the user's favorite way of completing the task?"
answer = peer.chat(query)
```
```typescript TypeScript
const query = "What is the user's favorite way of completing the task?"
const dialecticResponse = await peer.chat(query)
```
</CodeGroup>
## Streaming Dialectic Call
<CodeGroup>
```python Python
query = "What do we know about the user?"
response_stream = peer.chat(query, stream=True)
for line in response_stream.iter_text():
print(line)
```
```typescript TypeScript
const query = "What do we know about the user?"
const responseStream = await peer.chat(query, { stream: true })
for await (const line of responseStream.iter_text()) {
console.log(line)
}
```
</CodeGroup>
We've designed the Dialectic endpoint to be infinitely flexible. We wrote an incomplete list of ideas on how to use it on our blog [here](https://blog.plasticlabs.ai/blog/Introducing-Honcho's-Dialectic-API#how-it-works).

View File

@ -1,7 +1,7 @@
---
title: 'Get Context'
description: 'Learn how to use get_context() to retrieve and format conversation context for LLM integration'
icon: 'messages'
icon: 'list-timeline'
---
The `get_context()` method is your one-stop-shop for solving memory in LLM applications. It curates the LLM's context window with everything needed for contextually-aware conversations: recent messages, relevant historical context, and conversation summaries. When you add a `peer_target`, it also includes peer cards and Honcho's reasoning about participants.
@ -217,7 +217,7 @@ context = session.get_context(peer_target=user, tokens=4000) # Larger models
```
</CodeGroup>
Adjust token limits when you're hitting model context limits or want more/less conversation history.
**When to adjust:** When you're hitting model context limits or want more/less conversation history.
### Disabling Summaries
@ -241,7 +241,7 @@ context = session.get_context(peer_target=user, summary=False, tokens=2000)
```
</CodeGroup>
This is useful for short conversations where full message history fits in context, or when you prefer verbatim exchanges over summarized history.
**When to use:** Short conversations where full message history fits in context, or when you prefer verbatim exchanges over summarized history.
### Removing Personalization
@ -263,7 +263,7 @@ messages = context.to_openai(assistant=assistant)
```
</CodeGroup>
Use this when you explicitly don't want personalization or need to reduce context size. Most applications benefit from including `peer_target`.
**When to use:** When you explicitly don't want personalization or need to reduce context size. Most applications benefit from including `peer_target`.
## Complete Integration Examples

View File