Skip to main content

Semantic memory for conversational AI - remember, recall, forget. Sub-100ms retrieval with emotional ranking and graph reasoning.

Project description

Memorer Python SDK

Memory for AI agents. Remember conversations, recall context, forget when needed.

pip install memorer

Usage

from memorer import Memorer

client = Memorer(api_key="mem_sk_...")
user = client.for_user("user-123")

# During conversation, store what matters
user.remember("User mentioned they're allergic to shellfish")
user.remember("Has a meeting with Sarah next Friday at 2pm")
user.remember("Just adopted a dog named Biscuit")

# Before responding, recall relevant context
results = user.recall("any dietary restrictions?")
print(results.context)
# → "User is allergic to shellfish"

results = user.recall("what's on their schedule?")
print(results.context)
# → "Meeting with Sarah on Friday at 2pm"

Conversations

Track conversation history (short-term memory) combined with semantic recall (long-term memory):

# Start or continue a conversation
conv = user.conversation("session-123")  # existing session
# or
conv = user.conversation()  # create new

# Add messages (auto-extracts memories)
conv.add("user", "I just moved to Seattle and love coffee")
conv.add("assistant", "Welcome to Seattle! Great city for coffee lovers.")

# Query with conversation context + long-term memories
result = conv.recall("where does the user live")
print(result.context)  # Combined context ready for LLM
# → Recent conversation + "User lives in Seattle" (extracted memory)

# Get recent messages
messages = conv.messages(limit=20)

Graph Reasoning

Connect memories across conversations:

results = user.recall(
    "gift ideas for them",
    use_graph_reasoning=True,
)
# → Connects: new dog + mentioned liking outdoors → dog hiking gear

Resources

entities = user.entities.list()
memories = user.memories.list()
conversations = user.conversations.list()
communities = client.graph.communities()

Links

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

memorer-0.5.1.tar.gz (21.4 kB view details)

Uploaded Source

Built Distribution

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

memorer-0.5.1-py3-none-any.whl (30.2 kB view details)

Uploaded Python 3

File details

Details for the file memorer-0.5.1.tar.gz.

File metadata

  • Download URL: memorer-0.5.1.tar.gz
  • Upload date:
  • Size: 21.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for memorer-0.5.1.tar.gz
Algorithm Hash digest
SHA256 f7c65ec0836067b612fcc371b8b573d6e7afb4f5737e9a73e6f66e5e2eb6784d
MD5 590c4a4fb9cddde620c9d305b457137b
BLAKE2b-256 4f5c1675aecf590de33530673b1dceaf85c3e05f17a9e8bbb77e10e85e84c838

See more details on using hashes here.

File details

Details for the file memorer-0.5.1-py3-none-any.whl.

File metadata

  • Download URL: memorer-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 30.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for memorer-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 91ac163664820d0b26ec4b95eb93f59db1afc4f9b679df268807d258abfed8a5
MD5 76c69cc508745c3df51f7088890cda53
BLAKE2b-256 cc47411e3f7d4903499b1440752ee03127524797c62004fb08ac080a3f25a047

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