Skip to main content

HMG Agent Memory SDK — Community Edition

Project description

hmg

Version License Python

Python SDK for the HMG agent memory system.

Install

pip install hmg-sdk

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


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-1.6.6.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

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

hmg_sdk-1.6.6-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file hmg_sdk-1.6.6.tar.gz.

File metadata

  • Download URL: hmg_sdk-1.6.6.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for hmg_sdk-1.6.6.tar.gz
Algorithm Hash digest
SHA256 8c264e3fd0a5bfb95a002053981084fe2af49899d108ee7c006b8b87c40dfe93
MD5 0bb0994112e0faa016e6bee3e2d55c9e
BLAKE2b-256 afc4de841d2efbaed6b76ee06ef66423d2f4fbd48930c016eae06fc3baf57641

See more details on using hashes here.

File details

Details for the file hmg_sdk-1.6.6-py3-none-any.whl.

File metadata

  • Download URL: hmg_sdk-1.6.6-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.5

File hashes

Hashes for hmg_sdk-1.6.6-py3-none-any.whl
Algorithm Hash digest
SHA256 02dd0d4e872786143adefccca2666939d952929888d1c4b99e7b82d7e68fd67a
MD5 d76ab468a3f5b26d1eec607a6b996629
BLAKE2b-256 dac96fed491cb537f3c7fc9b18a19dd61031a8dad2e98b89dffb4a72542c972f

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