honcho-ai
Status: Alpha — do not use in production. This SDK is under active development.
Rust SDK for Honcho — AI agent memory and social cognition infrastructure.
Installation
Quickstart
use Honcho;
async
API Overview
Client
let client = new?;
// or with builder:
let client = from_params?;
// Workspace operations
client.force_ensure.await?;
let meta = client.get_metadata.await?;
client.set_metadata.await?;
let config = client.get_configuration.await?;
let page = client.peers.await?;
let page = client.sessions.await?;
let results = client.search.await?;
client.schedule_dream.await?;
client.delete_workspace.await?;
Peer
let peer = client.peer.await?;
// Chat (dialectic)
let reply = peer.chat.await?;
let reply = peer.chat_with_options.await?;
// Streaming chat
let stream = peer.chat_stream.target.send.await?;
// Representation
let rep = peer.representation.await?;
let rep = peer.representation_builder
.search_query
.search_top_k
.send.await?;
// Context & Card
let ctx = peer.context.await?;
let ctx = peer.context_with_target.await?;
let card = peer.get_card.await?;
peer.set_card.await?;
// Conclusions
let scope = peer.conclusions;
let conclusions = scope.list.await?;
let cross = peer.conclusions_of;
// Sessions
let page = peer.sessions.await?;
// Search
let results = peer.search.await?;
// Metadata CRUD
peer.refresh.await?;
let meta = peer.get_metadata.await?;
peer.set_metadata.await?;
peer.update.await?;
Session
let session = client.session.await?;
// Messages (batch up to 100)
let msgs = session.add_messages.await?;
let page = session.messages.await?;
let msg = session.get_message.await?;
let msg = session.update_message.await?;
// File upload (builder pattern)
let msgs = session.upload_file
.peer
.metadata
.send.await?;
// Streaming upload
let msgs = session.upload_file_streamed
.peer
.send.await?;
// Peer management
session.add_peer.await?;
session.add_peers.await?;
session.set_peers.await?;
session.remove_peers.await?;
let peers = session.peers.await?;
let cfg = session.get_peer_configuration.await?;
session.set_peer_configuration.await?;
// Context & Search
let ctx = session.context.await?;
let results = session.search.await?;
let summaries = session.summaries.await?;
let rep = session.representation.await?;
let status = session.queue_status.await?;
// Clone & Delete
let cloned = session.clone_session.await?;
let cloned = session.clone_session_with_message.await?;
session.delete.await?;
// Metadata CRUD
session.refresh.await?;
let meta = session.get_metadata.await?;
session.set_metadata.await?;
let config = session.get_configuration.await?;
session.set_configuration.await?;
Pagination
let page = client.peers.await?;
for peer in page.items
// Auto-fetch all pages
let stream = page.into_stream;
pin_mut!;
while let Some = stream.next.await
// Manual pagination
while page.has_next
Blocking API
Enable the blocking feature for synchronous access:
[]
= { = "0.2", = ["blocking"] }
use Honcho;
let client = new?;
let peer = client.peer?;
let reply = peer.chat?;
Rust-Only APIs
These APIs have no equivalent in the Python/TypeScript SDKs:
Honcho::force_ensure()— explicitly trigger workspace creation (normally lazy)Peer::conclusions()/Peer::conclusions_of()— scoped conclusion handles with lazy evaluationFileSourceenum — typed file upload sources (bytes,path,stream)DialecticStream::is_complete()— check stream termination without consuming
Features
| Feature | Default | Description |
|---|---|---|
rustls-tls |
yes | TLS via rustls |
native-tls |
TLS via native backend | |
blocking |
Synchronous API wrapper | |
tracing |
Emit tracing spans |
MSRV
1.88
Parity with Python SDK
| Feature | Python | Rust |
|---|---|---|
| Peer CRUD | ✓ | ✓ |
| Session CRUD | ✓ | ✓ |
| Messages (batch) | ✓ | ✓ |
| Dialectic chat | ✓ | ✓ |
| Streaming chat | ✓ | ✓ |
| Representation | ✓ | ✓ |
| Peer card | ✓ | ✓ |
| Conclusions | ✓ | ✓ |
| File upload | ✓ | ✓ |
| Context (OpenAI/Anthropic) | ✓ | ✓ |
| Blocking API | ✗ | ✓ |
| Webhooks | ✓ | ✗ |
| API keys | ✓ | ✗ |