Drop-in CrewAI memory integration for Neruva substrate. Replaces CrewAI's default storage with Records + KG federation. Persists across crew runs, supports semantic search via agent_recall, optional entity tracking via the HD knowledge graph. One-line install.
Project description
neruva-crewai
Drop-in CrewAI memory integration for Neruva. Three memory flavors backed by the Neruva substrate.
pip install neruva-crewai
Quick start
from neruva_crewai import NeruvaLongTermMemory
from crewai import Crew
memory = NeruvaLongTermMemory(
namespace="my_project", # one per crew / domain
api_key="nv_...", # or env NERUVA_API_KEY
)
crew = Crew(
agents=[...],
tasks=[...],
memory=True,
long_term_memory=memory, # plugged in here
)
Three memory flavors
| Class | What it backs | Underlying substrate |
|---|---|---|
NeruvaShortTermMemory |
CrewAI ShortTermMemory (per-run scratchpad) | Records, kind="short_term" |
NeruvaLongTermMemory |
CrewAI LongTermMemory (cross-run persistent) | Records, kind="long_term" |
NeruvaEntityMemory |
CrewAI EntityMemory (named entities + relationships) | Records + HD KG triples |
All three persist across process restarts via GCS — no Redis or Postgres setup required.
Entity memory with triple binding
Use the canonical extraction prompt to extract triples in your own LLM turn (Claude / GPT / etc), then pass them as metadata:
from neruva_crewai import NeruvaEntityMemory
entity_mem = NeruvaEntityMemory(namespace="my_project", api_key="nv_...")
# After your agent observes a fact about an entity:
entity_mem.save(
value="Caroline researches adoption agencies",
metadata={
"triples": [
["caroline", "researches", "adoption_agencies"],
["caroline", "works_at", "charity"],
],
},
)
# Later — sub-ms KG entity recall:
results = entity_mem.search("What did Caroline research?", limit=5)
Or use Neruva's agent_remember(extract="managed") to have the
substrate run extraction for you on every save (calls Sonnet 4.6,
~$0.002/turn).
Why use Neruva instead of CrewAI's default storage?
| Feature | CrewAI default | Neruva |
|---|---|---|
| Persists across process restart | ChromaDB local file | GCS-backed, multi-machine |
| Cross-crew recall | Manual setup | One namespace per crew, instant federation |
| Knowledge-graph entity tracking | LLM-based, opaque | HD KG, sub-ms cosine, deterministic |
| Causal queries / Pearl do-operator | Not offered | agent_causal_query |
| Provable replay | Not offered | agent_snapshot + agent_restore |
| GDPR forget by user | Manual | user_id auto-folds, one-call forget |
| Portability | None | .neruva zip container |
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 neruva_crewai-0.1.1.tar.gz.
File metadata
- Download URL: neruva_crewai-0.1.1.tar.gz
- Upload date:
- Size: 8.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d9bbe95a934819c92d640f4ca52c4b5f3f7926fe7828d0d5c49adb269bc410be
|
|
| MD5 |
f45f1d7c4ed03a02f936fe270149c88d
|
|
| BLAKE2b-256 |
e05b3d382b23325694304730252880961e3d7cb678bfc560b76ff40fa46226e0
|
File details
Details for the file neruva_crewai-0.1.1-py3-none-any.whl.
File metadata
- Download URL: neruva_crewai-0.1.1-py3-none-any.whl
- Upload date:
- Size: 9.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e8fba27515ef3849021ac3196558afac35e887163944c54a4afb2f3f8d3c97ad
|
|
| MD5 |
fc147baa5841744383c191ff1061c4a3
|
|
| BLAKE2b-256 |
9e91dbed7748400d78145d49ab8040ae637d83c424bc79169c184fe692de7f84
|