Skip to main content

Python SDK for SealedMind — encrypted, capability-gated AI memory on 0G.

Project description

sealedmind — Python SDK

Encrypted, capability-gated AI memory on 0G — Python edition.

pip install sealedmind
import asyncio
from sealedmind import SealedMind

async def main():
    client = SealedMind(api_key="sm_...")  # get one at sealedmind.io/developer

    mind = await client.create_mind("my-agent")

    await client.remember(mind.id, content="user prefers vegetarian meals")

    result = await client.recall(mind.id, query="what does the user prefer to eat?")
    print(result.answer)
    print("attested in:", result.attestation.enclave)

    await client.aclose()

asyncio.run(main())

Or just hit the TEE inference gateway directly (no Mind needed):

from sealedmind import SealedMind

client = SealedMind(api_key="sm_...")
content, att = await client.chat(
    [{"role": "user", "content": "Summarize the patient's recent activity"}]
)
print(content)
print(att.chat_id, att.verified, att.enclave)

Endpoints exposed

Method What it wraps
client.create_mind(name) POST /v1/minds
client.list_minds() GET /v1/minds
client.get_mind(id) GET /v1/minds/:id
client.remember(id, content=...) POST /v1/minds/:id/remember
client.recall(id, query=...) POST /v1/minds/:id/recall
client.grant_capability(id, ...) POST /v1/minds/:id/capabilities
client.list_capabilities(id) GET /v1/minds/:id/capabilities
client.revoke_capability(id, capId) DELETE /v1/minds/:id/capabilities/:capId
client.audit_log(id) GET /v1/minds/:id/audit
client.chat(messages) POST /v1/inference/chat
client.verify_attestation(chatId) POST /v1/attestations/verify

Already on 0G Memory?

Use the addon instead — drop-in for KVStorageInterface:

pip install evermemos-sealedmind
export MEMSYS_ENTRYPOINTS_FILTER=core,sealedmind
export KV_STORAGE_TYPE=sealedmind

Auth

Get an API key:

  1. Visit sealedmind.io/developer
  2. Connect your wallet, sign a SIWE message
  3. Copy the sm_* key
  4. Pass it to SealedMind(api_key=...) or set SEALEDMIND_API_KEY env var

License

MIT — see the monorepo at https://github.com/SealedMind/SealedMindMonoRepo

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

sealedmind-0.1.0.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

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

sealedmind-0.1.0-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sealedmind-0.1.0.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for sealedmind-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0912721f455f4897b4a35fd0be1497dde75cae8cf6bf3d20da1db49a2959f6cd
MD5 b22535d22be3bd55977f8212ceeb21c6
BLAKE2b-256 92da340b72e893d830299998722d4f272cd81245f4f76d4076f95a3eeb56876c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sealedmind-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for sealedmind-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7a9e043ba5c2b6eb9c7018e4a4b529b80a22b68d8fa40ecc0af1f7f02a353bb4
MD5 72490c21a86a9fcfa76dda9377253e92
BLAKE2b-256 9dc0e4918c9e0864768be570a6d26321a30fb3507fe895ebf61e15ecf51daed5

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