Skip to main content

Python client SDK for Stigmem — the federated knowledge fabric

Project description

stigmem-py

Python client SDK for Stigmem — the federated knowledge fabric.

Install

pip install stigmem-py

Quick start

from stigmem import StigmemClient, string_value

client = StigmemClient(url="http://localhost:8765", api_key="sk-...")
fact = client.assert_fact(
    entity="user:alice",
    relation="memory:role",
    value=string_value("CEO"),
    source="agent:cto",
    session_id="session:example",
)
page = client.query(entity="user:alice", scope="company")

Session and provenance options

Agent integrations should pass a stable session_id on reads and writes so the node can enforce same-session read/write graph isolation. Writes that summarize facts read earlier in the same session should use write_mode="summarize_with_provenance" and carry source facts in derived_from.

from stigmem import text_value

client.assert_fact(
    entity="handoff:session-123",
    relation="intent:handoff_summary",
    value=text_value("Summarized context for the next agent."),
    source="agent:openclaw",
    session_id="session:example",
    write_mode="summarize_with_provenance",
    derived_from=[{"fact_id": "fact-source-001"}],
)

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

stigmem_py-0.9.0a7.tar.gz (13.3 kB view details)

Uploaded Source

Built Distribution

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

stigmem_py-0.9.0a7-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

Details for the file stigmem_py-0.9.0a7.tar.gz.

File metadata

  • Download URL: stigmem_py-0.9.0a7.tar.gz
  • Upload date:
  • Size: 13.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for stigmem_py-0.9.0a7.tar.gz
Algorithm Hash digest
SHA256 8c5c891c0f4f8f6b2be38b5f7e9be5b4fabe42ded50e9b6d48f39183bdcce207
MD5 39a573ab10da801f20dfe6bed1a326ad
BLAKE2b-256 c1d4666ef3b763aa8f43627d2cbcf4f8a5a24c884eb5dac963ac2654ef2da275

See more details on using hashes here.

Provenance

The following attestation bundles were made for stigmem_py-0.9.0a7.tar.gz:

Publisher: publish.yml on eidetic-labs/stigmem

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file stigmem_py-0.9.0a7-py3-none-any.whl.

File metadata

  • Download URL: stigmem_py-0.9.0a7-py3-none-any.whl
  • Upload date:
  • Size: 10.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for stigmem_py-0.9.0a7-py3-none-any.whl
Algorithm Hash digest
SHA256 2f89f9e93200d68b78b164ce99585e9de1a8255d8954b1b2ce6f69ad6e204df9
MD5 fde35e614164ad56f8e67b453bb2bc40
BLAKE2b-256 5c2ecfd6fa0ac1621c86a05f674c585f97f33d38a6edc39c6d15de079a9c6c3e

See more details on using hashes here.

Provenance

The following attestation bundles were made for stigmem_py-0.9.0a7-py3-none-any.whl:

Publisher: publish.yml on eidetic-labs/stigmem

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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