Skip to main content
Integrate Honcho with CrewAI to build agents that maintain memory across sessions. This guide uses CrewAI’s unified Memory API with Honcho as a custom storage backend.
The full code is available on GitHub with examples in Python.

What We’re Building

  • CrewAI orchestrates agents, tasks, and memory recall.
  • Honcho persists CrewAI memory records and exposes additional context, search, and reasoning tools.
CrewAI currently supports Python >=3.10,<3.14; use one of those interpreters when installing this integration.

Setup

Install the packages:
Set your model provider keys and Honcho configuration:
For local development, initialize the Honcho client with environment="local".

CrewAI Memory Storage

HonchoMemoryStorage implements CrewAI’s current StorageBackend protocol and can be passed directly to Memory(storage=...).
CrewAI embeds memory records before storing them. The Honcho backend stores those records as Honcho messages, keeps CrewAI metadata in message metadata, and performs vector search over the stored embeddings.
Use the memory instance with a crew:
Python
HonchoStorage is still available as a compatibility adapter for older CrewAI ExternalMemory integrations, but new projects should use HonchoMemoryStorage.

CrewAI Tool Integration

Honcho also provides tools that let agents explicitly retrieve memory:
  • HonchoGetContextTool retrieves session context with token limits.
  • HonchoDialecticTool queries Honcho’s representation of a peer.
  • HonchoSearchTool performs semantic search over session messages.
Python

When To Use Each

Use HonchoMemoryStorage when you want CrewAI to handle recall automatically through the unified memory system. Use the Honcho tools when the agent should decide when and how to query memory, search messages, or ask Honcho for a peer-level representation. You can combine both: unified memory for baseline context, tools for targeted retrieval. See the hybrid memory example for a complete implementation.

Honcho Architecture

Understand Honcho’s peer-based model and core primitives

Get Context

Learn about retrieving and formatting conversation context

Chat API

Query peer representations for deeper understanding

LangGraph Integration

Build stateful agents with LangGraph and Honcho