Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

hongzhao

A file-based, human-gated memory ledger for AI coding agents.

Agents take notes constantly; most of those notes rot in chat logs. hongzhao gives your agent a small set of plain-text ledgers — claims, project contracts, knowledge entries — with deterministic validation and compilation. Nothing enters an agent's context until you (or a rule you wrote) say so.

  • Plain files, no lock-in. Markdown + YAML under one root. No server, no database, no cloud.
  • Two gates. Raw notes are candidates; compile turns reviewed candidates into effective views. Candidates never leak into context.
  • Deterministic core. Validation, compilation and rendering are pure scripts; only semantic judgment (what is a fact, what supersedes what) belongs to the agent.

Status: pre-release (v0.1). Interfaces may change before v0.1.0.

Install with your AI agent (one line)

Tell your coding agent (Claude Code, Codex CLI, ZCode, ...):

Read https://github.com/cmeng-CM/hongzhao/blob/main/docs/INSTALL.md and install hongzhao for me. My client is claude_code.

It will follow the agent install protocol and report a pass/fail table. Prefer typing yourself? Manual install is three commands.

Support matrix

Status
macOS / Linux Supported (Python 3.9+; CI-tested on 3.12/3.13)
Windows native Not supported — init fails fast (symlink-based skill linking; revisit in v0.2)
Python 3.9+ (CI-tested on 3.12/3.13; single runtime dependency: PyYAML)
Preset clients Claude Code, Codex CLI, ZCode (more via custom config in v0.1)
Install pip / uv / pipx

With / without

Concern Without hongzhao With hongzhao
Agent notes Scattered across chat logs, gone on close Versioned raw records with schema and trace
What the agent "knows" Whatever is pasted into the prompt Compiled effective views, routed by task
Conflicting facts Last message wins Explicit relations (supersedes / conflicts) resolved at compile time
Onboarding a new agent session Re-explain everything One bootstrap block injected into the client file
Leaving the tool — Delete the managed block; your files remain plain markdown

60-second quickstart

pip install hongzhao            # or: uv tool install hongzhao
hongzhao init ~/my-memory --example
hongzhao --root ~/my-memory compile
hongzhao --root ~/my-memory validate

You now have a green demo kit: raw notes, a compiled index, and a rendered bootstrap. Explore ~/my-memory/compiled/ — every view is plain markdown.

Daily loop:

hongzhao --root ~/my-memory validate     # schema + containment checks
hongzhao --root ~/my-memory compile      # rebuild derived views
hongzhao --root ~/my-memory doctor       # client / blocks / output health

Agent installation block

Paste this into your agent client's instruction file (or let bridge-install manage the block for you — see docs/clients.md):

# hongzhao memory routing
memory_root: ~/my-memory
Read compiled/bootstrap.md first; route tasks via compiled/effective-memory/index.md.
Never read raw/ except for evidence tracing. Run `hongzhao --root ~/my-memory compile`
after writing records; treat compile errors as stop signals.

How it works

raw/ (claims, dated truth)        ──compile──▶  compiled/ (effective views)
registry/ + project contracts     ──compile──▶  render/   (bootstrap, client blocks)
knowledge registry                ──compile──▶  knowledge map

Five explicit relations between claims (supersedes, covers, derives, conflicts, resolves) replace "newest wins". See docs/claim-schema.md and the diagrams in docs/design.md.

Non-goals

  • No MCP server, no vector search, no RAG, no auto-extraction, no web UI.
  • No team sharing / multi-machine sync (single-writer by design).
  • No Windows native support in v0.1.
  • No background daemons — every command is explicit, every write is atomic.

Why-not

Approaches we deliberately did not take (and what to use instead):

  • Vector DB / embeddings: file paths and titles already route a coding agent well; retrieval quality was not the bottleneck, review discipline was.
  • Auto-summarization on every turn: unreviewed summaries are how memory rots; hongzhao makes candidates explicit and gates them.
  • A server / API: a memory you cannot grep, diff, and back up with git is not your memory.
  • An embedded database: merge conflicts and plain-text portability beat query power at this data scale.

Full documentation: docs/. Security model: SECURITY.md. Contributing (DCO required): CONTRIBUTING.md. Beta program: docs/beta.md.

License: Apache-2.0 — see LICENSE. 中文简介:README.zh-CN.md。

Metadata

Release files for hongzhao 0.1.0rc3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hongzhao 0.1.0rc3
File Size Uploaded Provenance Actions
hongzhao-0.1.0rc3.tar.gz 59.9 kB With provenance Details for hongzhao-0.1.0rc3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for hongzhao 0.1.0rc3
File Interpreter ABI Platform Actions
hongzhao-0.1.0rc3-py3-none-any.whl Python 3 none any Details for hongzhao-0.1.0rc3-py3-none-any.whl

Total release size: 125.7 kB

Release files / hongzhao-0.1.0rc3.tar.gz

Download URL hongzhao-0.1.0rc3.tar.gz
Size 59.9 kB
Tags Source
SHA-256 checksum
How to use checksums
aebf4a7beb41f9000f745b7d38e265b76c0c4419dfbb995b0c7579edbae26c83
BLAKE2b-256 checksum
How to use checksums
eba213bed55eec6ad6affd4803ffe9d746585ff0149615c6833cb65bd8869073
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 2, 2026.

Transparency log

Release files / hongzhao-0.1.0rc3-py3-none-any.whl

Download URL hongzhao-0.1.0rc3-py3-none-any.whl
Size 65.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5d04efa74f1664114dea572d0cd29ceec672773cd016dce7944402daaa683359
BLAKE2b-256 checksum
How to use checksums
17d08df36a61345e3395e80d202e11002dd7d667373e6fcf2daef94d31206dd2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 2, 2026.

Transparency log

Security for hongzhao 0.1.0rc3

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

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for hongzhao-0.1.0rc3.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 Nov 2, 2026.

Transparency log

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page