DinoMem integration for CrewAI — drop-in memory tools for any Crew agent
Project description
dinomem-crewai
CrewAI integration for DinoMem. Ships two pre-built tools that match the shape of CrewAI's built-in RecallMemoryTool / RememberTool — agents get hybrid retrieval (semantic + keyword + graph), multi-agent scoping, and Postgres-native storage with one config object.
pip install dinomem-crewai
Quick start
from crewai import Agent, Crew, Task
from dinomem_crewai import DinoMemConfig, create_dinomem_tools
config = DinoMemConfig(
api_key="sk-...",
agent_id="support-bot",
scope="team", # optional default
)
support = Agent(
role="Support specialist",
goal="Help customers and remember what they prefer.",
backstory="...",
tools=create_dinomem_tools(config),
)
crew = Crew(agents=[support], tasks=[Task(...)])
crew.kickoff()
The agent now has two tools — Search memory and Save to memory — that hit DinoMem instead of the local LanceDB/Mem0 default.
Tools
| Tool | Purpose | Input |
|---|---|---|
DinoMemRecallTool |
Hybrid search; returns top hits with scores. | queries: list[str] |
DinoMemRememberTool |
Writes one or more facts. | contents: list[str] |
Both match CrewAI's built-in shape (name, description, args_schema), so agents pick them automatically — you don't have to retrain on tool descriptions.
Helpers (without tools)
For custom flows — pre-search before a task starts, post-extract facts after a run, etc.:
from dinomem_crewai import add_memory, recall_memories, search_memories
await_text = recall_memories("what does this customer prefer?", config)
# → "Relevant memories...\n- (score=0.85) ..."
hits = search_memories("escalation policy", config)
# → list[MemoryHit]
add_memory("Customer prefers email over phone.", config)
Config reference
| Field | Default | Purpose |
|---|---|---|
api_key |
— | Required. |
agent_id |
— | Required. |
base_url |
hosted | Self-host override. |
scope |
private | Default visibility for writes. |
role |
— | Default agent role. |
workflow_id |
— | Group memories by workflow / session. |
top_k |
5 | Max hits per recall. |
rerank |
false | Re-score with Gemini (+0.5-1.5s). |
min_score |
0.0 | Drop hits below this score. |
Comparison
CrewAI's built-in memory uses LanceDB (or Mem0 if configured). This package gives you DinoMem's Postgres-native, multi-agent-aware memory layer through the same tool interface — no Memory rewrite, no separate storage layer.
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dinomem_crewai-1.0.0.tar.gz.
File metadata
- Download URL: dinomem_crewai-1.0.0.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9ad2c97e18e313c56c512ba4a8487f3f5796e538712860085affb37910e492dd
|
|
| MD5 |
98c702b8912535693b6e8c0a517fab53
|
|
| BLAKE2b-256 |
fe2209b830e3749c751ec4efca3cbea578fe7d47c28a32fc23c018ef8f57f8dc
|
File details
Details for the file dinomem_crewai-1.0.0-py3-none-any.whl.
File metadata
- Download URL: dinomem_crewai-1.0.0-py3-none-any.whl
- Upload date:
- Size: 6.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1198800d47b941f5cd37c9626313bd9096d91323b0e9e44288ad5ae4040cceb8
|
|
| MD5 |
b82697931f4cb9d9570edc1d1734d445
|
|
| BLAKE2b-256 |
a8b389171adffdeeae67407bd5b5743235b982c463798a18504573ebfbe4df8d
|