Skip to content

feat: add CrewAI integration for persistent crew memory#319

Merged
nicoloboschi merged 4 commits intomainfrom
feat/crewai-integration
Feb 18, 2026
Merged

feat: add CrewAI integration for persistent crew memory#319
nicoloboschi merged 4 commits intomainfrom
feat/crewai-integration

Conversation

@benfrank241
Copy link
Contributor

Summary

  • Adds hindsight-crewai package — a CrewAI ExternalMemory storage backend powered by Hindsight
  • Maps CrewAI's Storage interface (save/search/reset) to Hindsight's retain/recall/delete APIs
  • Exposes HindsightReflectTool as a CrewAI BaseTool for disposition-aware memory synthesis
  • Supports per-agent memory banks, bank missions, configurable tags and budgets
  • Includes async compatibility layer (_compat.py) to handle CrewAI's internal threading/event loop model
  • 35 unit tests, docs site page, README, example script, and manual test script
  • Manually tested end-to-end: smoke test, multi-run memory persistence, reflect tool calls

Files

  • hindsight-integrations/crewai/ — full package (storage, tools, config, errors, compat, tests)
  • hindsight-docs/docs/sdks/integrations/crewai.md — docs site page
  • hindsight-docs/sidebars.ts — sidebar nav entry

Test plan

  • uv run pytest tests/ -v — 35 unit tests pass
  • ruff check and ruff format — clean
  • Manual end-to-end test with live Hindsight API + CrewAI crew (save, search, reflect, reset all working)
  • Multi-run memory persistence verified (Run 2 recalls memories from Run 1)

🤖 Generated with Claude Code

@@ -0,0 +1,120 @@
"""
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we move this to the cookbook ?
actually we must have on example there

benfrank241 and others added 4 commits February 18, 2026 10:54
Implements a CrewAI ExternalMemory storage backend that maps CrewAI's
Storage interface (save/search/reset) to Hindsight's retain/recall/delete
APIs, giving crews long-term memory with fact extraction, entity tracking,
and temporal awareness across runs.

Key features:
- HindsightStorage: drop-in Storage backend for CrewAI ExternalMemory
- HindsightReflectTool: BaseTool exposing Hindsight's reflect API
- Per-agent memory banks with customizable bank resolver
- Async compatibility layer for CrewAI's threading model
- 35 unit tests, docs site page, example script

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move research_crew.py example from hindsight-integrations/crewai/examples/
to the cookbook repo and update the integration README to link there instead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The test-crewai-integration CI job uses `uv sync --frozen` which
requires a committed lock file.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@benfrank241 benfrank241 force-pushed the feat/crewai-integration branch from 1c5b03e to cc9c610 Compare February 18, 2026 15:54
@nicoloboschi nicoloboschi merged commit 41db296 into main Feb 18, 2026
27 of 31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants