synap-crewai
Synap memory for CrewAI. SynapStorageBackend plugs into CrewAI's unified Memory so records are stored in and recalled from Synap; SynapMemory makes recall work against it; SynapCrewAIListener reports the run (turns, tool calls, reasoning) on Synap's live stream.
Install
pip install maximem-synap-crewai
(import name: synap_crewai; requires Python 3.11+, maximem-synap, maximem-synap-integrations-common and crewai>=1.10.)
Quickstart
from crewai.memory.types import MemoryRecord
from synap_crewai import SynapMemory, SynapStorageBackend
backend = SynapStorageBackend(sdk, user_id="alice", customer_id="acme") # sdk: a MaximemSynapSDK
memory = SynapMemory(storage=backend) # pass to Crew(memory=memory)
backend.save([MemoryRecord(content="Isha is vegetarian", scope="/diet",
categories=["preference"], importance=0.8)])
hits = backend.search([0.0], metadata_filter={"_query_text": "What does Isha eat?"})
# hits[0][0].scope == "/acme/alice" (the annotation: /customer/user)
This example was run against a recording stand-in for the SDK; with a real MaximemSynapSDK the same calls go to Synap.
Deeper scope ladders
If your account's scope ladder has more levels than customer and user, pass the address of the level to read and write at. It is sent only when set; without it every call is exactly what it was.
path = {"customer": "acme", "team": "payments", "user": "dana"} # from sdk.get_scope_ladder() / ScopeAddress
backend = SynapStorageBackend(sdk, user_id="dana", customer_id="acme", scope_path=path)
listener = SynapCrewAIListener(sdk, user_id="dana", conversation_id="c1",
customer_id="acme", scope_path=path)
- The ids you pass must agree with the path's
userandcustomerlevels (an emptycustomer_idis fine). A mismatch raisesSynapIntegrationErrorat construction, because the server would otherwise let the path win and file the memory under the path's user. - The annotation drops the keys.
MemoryRecord.scopeis built from the path's values in the order you give them (/acme/payments/dana), not from the level keys. Without a path it is/customer/useras before. The order only affects this annotation; the server orders levels by their ladder position. - A path value containing
/would make the annotation ambiguous, so it is rejected.
Metadata
Release files for maximem-synap-crewai 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| maximem_synap_crewai-0.3.0.tar.gz | 40.5 kB | Without provenance | Details for maximem_synap_crewai-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| maximem_synap_crewai-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for maximem_synap_crewai-0.3.0-py3-none-any.whl |
Total release size: 62.5 kB
Release files / maximem_synap_crewai-0.3.0.tar.gz
| Download URL | maximem_synap_crewai-0.3.0.tar.gz |
|---|---|
| Size | 40.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8780ebc11e330ce92019ea7e5c58c64dbefd708f7579b28671de416c609f2a77
|
|
BLAKE2b-256 checksum How to use checksums |
ca3fc45b83f76fa923d3693af90d63a2f6e688ac04a3919a2052c9281f7c185b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.4
|
Release files / maximem_synap_crewai-0.3.0-py3-none-any.whl
| Download URL | maximem_synap_crewai-0.3.0-py3-none-any.whl |
|---|---|
| Size | 22.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
50b2e2ff7687f8ac90c531828796ab56fad18d2032a72026146e8d67296c3e1e
|
|
BLAKE2b-256 checksum How to use checksums |
f2a50d77daae8174601899237a5966bafab9a52c49f7052f25d7c05a25f21ce1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.4
|
Security for maximem-synap-crewai 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.