2.2 KiB
2.2 KiB
Honcho CrewAI Integration
Build CrewAI agents with persistent memory and reasoning capabilities powered by Honcho.
Installation
uv add honcho-crewai crewai python-dotenv
CrewAI currently supports Python >=3.10,<3.14; this package follows the same range.
Quick Start
from crewai import Agent, Crew, Memory, Process, Task
from honcho import Honcho
from honcho_crewai import HonchoMemoryStorage
honcho = Honcho(workspace_id="crewai-demo")
storage = HonchoMemoryStorage(
peer_id="user-123",
session_id="session-123",
honcho_client=honcho,
)
memory = Memory(storage=storage)
memory.remember(
"The user is learning Python and wants to build web applications.",
scope="/users/user-123",
categories=["preferences"],
metadata={"source": "onboarding"},
)
agent = Agent(
role="Programming Mentor",
goal="Help users learn programming by remembering their interests and progress",
backstory="You are a patient programming mentor.",
)
task = Task(
description="Suggest a Python web project that matches the user's interests.",
expected_output="A specific project suggestion with a brief explanation",
agent=agent,
)
crew = Crew(
agents=[agent],
tasks=[task],
process=Process.sequential,
memory=memory,
)
result = crew.kickoff()
print(result.raw)
Features
HonchoMemoryStorage: CrewAI unifiedMemorystorage backend.HonchoStorage: compatibility adapter for older CrewAIExternalMemoryusage.HonchoGetContextTool,HonchoDialecticTool, andHonchoSearchToolfor explicit Honcho memory retrieval.- Lazy Honcho peer/session handles, matching the latest Honcho SDK get-or-create behavior.
Documentation
For comprehensive guides, examples, and API reference, visit: https://honcho.dev/docs/v3/integrations/crewai
Examples
Check out complete examples in the GitHub repository.
License
AGPL-3.0-or-later
Support
- Report issues: GitHub Issues
- Documentation: honcho.dev/docs
- Website: honcho.dev