Skip to main content

Synap memory plugin for NVIDIA NeMo Agent Toolkit (NAT)

Project description

synap-nemo-agent-toolkit

Synap memory plugin for NVIDIA NeMo Agent Toolkit (NAT).

Implements nat.memory.interfaces.MemoryEditor so that NAT workflows can use Synap as long-term memory out of the box — either programmatically, or via a single YAML line:

memory:
  synap:
    _type: synap_memory
    customer_id: "acme"          # optional scope
    mode: "accurate"              # or "fast"

Install

pip install synap-nemo-agent-toolkit

Depends on maximem-synap>=0.2.0, synap-integrations-common>=0.1.0, and nvidia-nat-core>=1.0.

Use (programmatic)

from maximem_synap import MaximemSynapSDK
from nat.memory.models import MemoryItem
from synap_nemo_agent_toolkit import SynapMemoryEditor

sdk = MaximemSynapSDK(api_key="...")
await sdk.initialize()

editor = SynapMemoryEditor(sdk=sdk, customer_id="acme", mode="accurate")

# Write
await editor.add_items([
    MemoryItem(
        user_id="alice",
        memory="Prefers tea over coffee",
        tags=["beverage", "preference"],
    ),
])

# Read — user_id is required on every search
hits = await editor.search("beverage preference", top_k=5, user_id="alice")
for hit in hits:
    print(hit.memory, hit.tags, hit.similarity_score)

Use (YAML / NAT workflow)

Set SYNAP_API_KEY (optionally SYNAP_INSTANCE_ID) in the environment and declare the memory provider in the workflow config:

memory:
  synap:
    _type: synap_memory
    customer_id: "acme"
    mode: "accurate"
    # Optional — falls back to SYNAP_API_KEY env if omitted
    # api_key: "${SYNAP_API_KEY}"

NAT's plugin loader picks up synap_memory via the nat.components entry-point registered in this package's pyproject.toml.

Error policy

Operation Synap failure Why
add_items SynapIntegrationError Writes must be observable
search Returns [] A read blip must never crash an agent turn
remove_items Warn once, no-op Synap has no public delete API

Every write is tagged with an internal marker so search filters out non-NAT memories that happen to share the same user scope — the MemoryItem stream stays NAT-owned.

License

Apache-2.0.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

maximem_synap_nemo_agent_toolkit-0.1.2.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file maximem_synap_nemo_agent_toolkit-0.1.2.tar.gz.

File metadata

File hashes

Hashes for maximem_synap_nemo_agent_toolkit-0.1.2.tar.gz
Algorithm Hash digest
SHA256 7fafb2c4de25a6181b05ff8b27625f1481f8bb8043bd790bc20ca2e67715d5a5
MD5 e0eb940844017bcc188d43d749379bba
BLAKE2b-256 1b4228af043c069da794d4e81d3bd78eb529a09a59e7773a1df66021e5efdf71

See more details on using hashes here.

File details

Details for the file maximem_synap_nemo_agent_toolkit-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for maximem_synap_nemo_agent_toolkit-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 04e7e0f5d8a199c3772fb52378bcc2e4c8d3e87c258d35c8bf9c2ce96c2b08e8
MD5 1389cf5397c13a66dd9718eccffd5a16
BLAKE2b-256 180a1545e5483129bdc5083b593f6a688ebea1747267e85dc70ebfb6bc20c8f1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page