HMG Agent Memory SDK — Community Edition
Project description
hmg
Python SDK for the HMG agent memory system.
Install
pip install hmg
Quick Start
from hmg import HMGClient
client = HMGClient(base_url="http://localhost:8080")
# Store a decision
client.memorize(
content="We chose PostgreSQL for the main database",
source="architecture-review",
modality="text",
)
# Recall it later
result = client.recall(query="database choice")
for atom in result.atoms:
print(f"[{atom.score:.2f}] {atom.text}")
# Correct when it changes
client.correct(
atom_id=atom.id,
action="replace",
reason="Migrated to CockroachDB",
new_content="We migrated to CockroachDB for horizontal scale",
)
API Surface
| Method | Description |
|---|---|
client.memorize(...) |
Store a memory atom |
client.recall(...) |
Recall memories by query |
client.correct(...) |
Correct a memory atom |
client.govern(...) |
Govern a memory atom's visibility |
client.handoff(...) |
Store a cross-session handoff |
client.agent_brief(...) |
Get session-start context |
client.history(...) |
Get correction/governance history |
client.stats() |
Get memory store statistics |
Requirements
- Python 3.9+
- HMG daemon running (
hmg daemon start)
License
Apache-2.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
hmg_sdk-0.9.2.tar.gz
(4.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hmg_sdk-0.9.2.tar.gz.
File metadata
- Download URL: hmg_sdk-0.9.2.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3fe6d1e12d18a92d8354d61214476c365ecb5381c867357119302290be52bc99
|
|
| MD5 |
e0dc9994dc1f67befc5b949bc1da4f3d
|
|
| BLAKE2b-256 |
b686a5fc909bf962a338d89d67bea66a712b8c9cdcbc2726b2df20a1f4dc3e64
|
File details
Details for the file hmg_sdk-0.9.2-py3-none-any.whl.
File metadata
- Download URL: hmg_sdk-0.9.2-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a05762a4bca7b64e3a76c4f9db145e8e9b10fe5f4ddee3d3615a5234b6477478
|
|
| MD5 |
d948f02858fa1f09cd94b0cf9246bcee
|
|
| BLAKE2b-256 |
2ca5f92b9623370aaa898b8fc0c44600c57360e2011b53cc6bd2904aa72fc353
|