gethaki
Python SDK for Haki — a long-term memory layer for AI agents. Every fact carries a date, a source and a status, so your agent uses what's true today and can prove it.
- Docs: https://docs.gethaki.space
- Source / self-hosting: https://github.com/GetHaki/Haki
- License: Apache-2.0
Install
pip install gethaki
Usage
from haki import HakiClient
from haki.runtime import build_prompt_context, capture_turn
client = HakiClient("http://localhost:8100")
# Before the LLM call: memory becomes an instruction block
packet = client.context(subject_id="usr_42", query=user_msg, project_id="prj")
prompt = build_prompt_context(packet) + "\n" + system_prompt
answer = my_llm(prompt, user_msg) # your LLM call and app code stay unchanged
# After the LLM call: the conversation turn goes back into memory
capture_turn(client, "usr_42", "prj", user_msg, answer)
AsyncHakiClient is available for async codebases. Typed errors
(HakiApiError, HakiConnectionError) instead of bare exceptions.
CLI
The haki command ships with this package:
haki connect --api-url http://localhost:8100
haki verify # memorizes a preference, then a correction to it, then proves
# a new conversation serves the current value and can show
# the one it replaced
haki status
haki mcp # package this SDK for Cursor's MCP integration
Requires
A running Haki API (self-hosted via docker compose up -d from the
main repo, or a Haki Cloud project).
This package is the client only — see the repo for the server.
Metadata
Release files for gethaki 0.2.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 |
|---|---|---|---|---|
| gethaki-0.2.0.tar.gz | 23.6 kB | With provenance | Details for gethaki-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gethaki-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for gethaki-0.2.0-py3-none-any.whl |
Total release size: 50.6 kB
Release files / gethaki-0.2.0.tar.gz
| Download URL | gethaki-0.2.0.tar.gz |
|---|---|
| Size | 23.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
205dcbbcec4164037e9869d5e68a19d2da0aaf6b151cd51763c86345363c5ec6
|
|
BLAKE2b-256 checksum How to use checksums |
92001def4319dac1cf1d07f8cc29e85ae56edae5d5bca36c9f9f6c2548be8c3d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 17, 2026.
Transparency logRelease files / gethaki-0.2.0-py3-none-any.whl
| Download URL | gethaki-0.2.0-py3-none-any.whl |
|---|---|
| Size | 27.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d1de6e94e9cb8add341b517d7f8dc16dc98d3cf6818e916042de8b1479e90b6d
|
|
BLAKE2b-256 checksum How to use checksums |
3bfd6ea9f0e05cccbd103c87132946c14b9089071044da6022d5448c682fa2b5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 17, 2026.
Transparency logSecurity for gethaki 0.2.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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for gethaki-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 17, 2026.
Transparency logA 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.