Metadata-Version: 2.4
Name: sealedmind
Version: 0.1.0
Summary: Python SDK for SealedMind — encrypted, capability-gated AI memory on 0G.
Author: SealedMind
License: MIT
Project-URL: Homepage, https://github.com/SealedMind/SealedMindMonoRepo
Project-URL: Documentation, https://github.com/SealedMind/SealedMindMonoRepo/blob/main/OVERVIEW.md
Project-URL: Repository, https://github.com/SealedMind/SealedMindMonoRepo
Keywords: ai,memory,0g,tee,web3,privacy,agents
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: httpx>=0.27.0
Requires-Dist: pydantic>=2.6.0
Provides-Extra: siwe
Requires-Dist: eth-account>=0.11.0; extra == "siwe"
Requires-Dist: siwe>=4.2.0; extra == "siwe"
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.23; extra == "dev"
Requires-Dist: ruff>=0.3; extra == "dev"
Requires-Dist: mypy>=1.8; extra == "dev"

# sealedmind — Python SDK

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

```bash
pip install sealedmind
```

```python
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):

```python
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`:

```bash
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
