Skip to main content

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

Apache-2.0

Release files for dinomem-crewai 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dinomem-crewai 1.0.0
File Size Uploaded
dinomem_crewai-1.0.0.tar.gz 6.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dinomem-crewai 1.0.0
File Interpreter ABI Platform
dinomem_crewai-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 13.0 kB

Release files / dinomem_crewai-1.0.0.tar.gz

Download URL dinomem_crewai-1.0.0.tar.gz
Size 6.5 kB
Tags Source
SHA-256 checksum
How to use checksums
9ad2c97e18e313c56c512ba4a8487f3f5796e538712860085affb37910e492dd
BLAKE2b-256 checksum
How to use checksums
fe2209b830e3749c751ec4efca3cbea578fe7d47c28a32fc23c018ef8f57f8dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / dinomem_crewai-1.0.0-py3-none-any.whl

Download URL dinomem_crewai-1.0.0-py3-none-any.whl
Size 6.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1198800d47b941f5cd37c9626313bd9096d91323b0e9e44288ad5ae4040cceb8
BLAKE2b-256 checksum
How to use checksums
a8b389171adffdeeae67407bd5b5743235b982c463798a18504573ebfbe4df8d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page