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.2.tar.gz (21.3 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.2-py3-none-any.whl (29.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: memorer-0.5.2.tar.gz
  • Upload date:
  • Size: 21.3 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.2.tar.gz
Algorithm Hash digest
SHA256 4953efc310eda32932d04a0b3818c3f2e3c733f2cbe864545ab7f8a4ae264b45
MD5 4e7a536f95e62b547fdbc8a05cad8737
BLAKE2b-256 4dda2e41e38ee25357085fd511481594cb8bcbd526ce79bd889a1f5e446c2943

See more details on using hashes here.

File details

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

File metadata

  • Download URL: memorer-0.5.2-py3-none-any.whl
  • Upload date:
  • Size: 29.9 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0d8dc38c88714f6df3daec4220d12d2c3e19866e985126474f08ed16c9e9d625
MD5 343f12ab93d52a053c09b47ff7f73d86
BLAKE2b-256 62e399cd1b45199eb49453895e63527a7fd2cc4564c4a6a685162329f6fc8732

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