Skip to main content

Your memory. Your machine. Every model.

Project description

memory-crystal

Your memory. Your machine. Every model.

Install

pip install memory-crystal

Use

from memory_crystal import weave, pull

weave("I was here.")
pull("here")

Two functions. That's it.

Memories on the demo expire in 15 minutes. The real version doesn't.

Note: the demo runs on Cloudflare KV, which is eventually consistent. New memories may take a few seconds to appear in pull results. Self-hosted servers don't have this delay.

What is this?

Memory Crystal gives AI agents persistent, searchable memory that works across models, sessions, and machines.

This Python SDK connects to any Memory Crystal MCP server. By default, it points at the free demo.

Custom server

from memory_crystal import Crystal

# Self-hosted
crystal = Crystal("http://localhost:8787/mcp")
crystal.weave("hello")
crystal.pull("hello")

# With auth
crystal = Crystal("https://your-server.dev/mcp", token="your-token")

# Context manager
with Crystal() as c:
    c.weave("session start")
    memories = c.pull()

API

weave(text, category=None, tag=None)

Write a memory. Returns confirmation with ID.

  • text (str): The memory to store
  • category (str, optional): fact, preference, event, opinion, or skill
  • tag (str, optional): A label for retrieval

pull(query=None, n=10)

Retrieve memories. Returns a list of memory dicts.

  • query (str, optional): Search term. If empty, returns all.
  • n (int, optional): Max results. Default 10.

connect(url, token=None)

Change the default server.

Crystal(url, token=None)

Class-based client for custom servers. Supports context manager.

Learn more

License

MIT. Work In Progress, Inc.

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

memory_crystal-0.1.0.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.

memory_crystal-0.1.0-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file memory_crystal-0.1.0.tar.gz.

File metadata

  • Download URL: memory_crystal-0.1.0.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for memory_crystal-0.1.0.tar.gz
Algorithm Hash digest
SHA256 228e5a614c2938934c2e3b47ac9b73e387cd513be64cf12938db00f1b7948de7
MD5 e86a672dd80fb69277fb1e8c3aca978c
BLAKE2b-256 42b04ec0c21282aa4bc06dc43858b40ce3f79a1d087a1abb2c2b5c11a06a39bb

See more details on using hashes here.

Provenance

The following attestation bundles were made for memory_crystal-0.1.0.tar.gz:

Publisher: publish.yml on wipcomputer/memory-crystal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file memory_crystal-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: memory_crystal-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for memory_crystal-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5c2afc7e8bbc8571699e267b62a017734a45fd5308b7500c305d3addaeb4e35d
MD5 a0ba76eef7a367bf7d1abf1d2a6d19d8
BLAKE2b-256 c8de453fea5eb55ad97f69eaebcc14f75660fca64dd0de2f25802b63b7ceef27

See more details on using hashes here.

Provenance

The following attestation bundles were made for memory_crystal-0.1.0-py3-none-any.whl:

Publisher: publish.yml on wipcomputer/memory-crystal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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