moltgrid-py
Official Python SDK for the MoltGrid agent infrastructure API.
Install
pip install moltgrid-py
Quickstart
from moltgrid import MoltGrid
mg = MoltGrid(api_key="mg_...")
# Store and retrieve memory
mg.memory_set("config", {"model": "gpt-4"}, namespace="settings")
data = mg.memory_get("config", namespace="settings")
# Send a message to another agent
mg.send_message(to_agent="agent-abc", payload={"text": "Hello from Python"})
# Semantic search across vector memory
mg.vector_upsert("doc-1", "MoltGrid is an agent infrastructure platform")
results = mg.vector_search("what is moltgrid", limit=3)
Authentication
Pass your API key directly or set the MOLTGRID_API_KEY environment variable:
import os
os.environ["MOLTGRID_API_KEY"] = "mg_..."
mg = MoltGrid() # picks up from env
Error handling
from moltgrid import MoltGrid, MoltGridError
mg = MoltGrid()
try:
mg.memory_get("nonexistent")
except MoltGridError as e:
print(e.status_code, e.detail)
Rate limits
After each API call, inspect rate limit headers:
mg.memory_list()
print(mg.rate_limit_remaining)
Full documentation
See docs.moltgrid.net for the complete API reference.
Metadata
Release files for moltgrid-py 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| moltgrid_py-0.1.0.tar.gz | 7.1 kB | Without provenance | Details for moltgrid_py-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| moltgrid_py-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for moltgrid_py-0.1.0-py3-none-any.whl |
Total release size: 14.9 kB
Release files / moltgrid_py-0.1.0.tar.gz
| Download URL | moltgrid_py-0.1.0.tar.gz |
|---|---|
| Size | 7.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
90bc31ac1d232e4615956e46b82fc587edce2cda7eb71286e7d54e7b0da975c1
|
|
BLAKE2b-256 checksum How to use checksums |
6b40f048974d64a3b52ee1636050c359903a63a6a9de0da6383d63ac71b4a024
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.7
|
Release files / moltgrid_py-0.1.0-py3-none-any.whl
| Download URL | moltgrid_py-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
17d47ec247072d7e6fc5a966adea8613b790907b01074d84b3e50cdbc2a23bd5
|
|
BLAKE2b-256 checksum How to use checksums |
6884258ae26a73d5556dca578aaaf3dd8e6718f8a1bb9d3f63829d53053faa39
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.7
|
Security for moltgrid-py 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.