Skip to main content

Synap memory integration for Agno — user memories backed by Synap

Project description

synap-agno

Synap integration for Agno — backs Agno's user memories with Synap's semantic memory store.

Install

pip install synap-agno

Requires agno>=2.0, maximem-synap>=0.2.0.

Quickstart

from agno.agent import Agent
from agno.models.openai import OpenAIChat
from maximem_synap import MaximemSynapSDK
from synap_agno import SynapDb

sdk = MaximemSynapSDK(api_key="sk-...")

agent = Agent(
    db=SynapDb(sdk, customer_id="acme"),
    model=OpenAIChat(id="gpt-4o-mini"),
    enable_user_memories=True,
)

agent.run("Remember that I prefer tea over coffee", user_id="alice")
agent.run("What do you remember about me?", user_id="alice")

Scope

Agno 2.x unifies every persistence concern (sessions, traces, evals, metrics, knowledge, culture, memories) under a single BaseDb with 46+ abstract methods. Synap natively backs only user memories, so SynapDb:

  • Extends Agno's InMemoryDb
  • Overrides user-memory methods (upsert_user_memory, get_user_memory, get_user_memories, get_all_memory_topics) to route through Synap
  • Leaves sessions, traces, evals, metrics, knowledge, and culture in-process (inherited from InMemoryDb)

Need durable sessions or traces? Use SqliteDb / PostgresDb from Agno directly — this package is scoped to memory specifically.

Error policy

  • Reads (get_user_memory, get_user_memories, get_all_memory_topics) degrade gracefully — SDK failures log at ERROR and return empty results.
  • Writes (upsert_user_memory, upsert_memories) surface SynapIntegrationError so ingestion outages are observable.
  • Deletes (delete_user_memory, delete_user_memories, clear_memories) warn once and no-op — Synap has no public delete API. Same contract used by synap-crewai.
  • Stats (get_user_memory_stats) warns once and returns ([], 0) — Synap doesn't expose aggregate counts.

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_agno-0.1.3.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

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

maximem_synap_agno-0.1.3-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file maximem_synap_agno-0.1.3.tar.gz.

File metadata

  • Download URL: maximem_synap_agno-0.1.3.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for maximem_synap_agno-0.1.3.tar.gz
Algorithm Hash digest
SHA256 7536d63bdb2b3633dde43d7a2e1fd8ac59441b2bc427b5d98ffbedce4100df93
MD5 588a786c1e995a92bf201ba0a5f08108
BLAKE2b-256 f2d2611741211c9e9fc0f06e3afe2f34ff8d1b57832ed44293feddf1fc5c59a9

See more details on using hashes here.

File details

Details for the file maximem_synap_agno-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for maximem_synap_agno-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 aaaa7b62d9d30994cdf9c1c21fa766a3ed80d5db4ffd50a605fb771ed0b6778f
MD5 6b8bb51527ee08122438c48f5e567bad
BLAKE2b-256 0288622e9561b26ecdad6b5ee097dc8aacb231d2e0d8e5826db99247be198366

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