Skip to content

MemNet v0.1.0

Choose a tag to compare

@chouswei chouswei released this 10 Jun 06:09

MemNet v0.1.0 — initial release

External, pure in-memory working-memory graph for LLM "goldfish brain" agents. Wire-format CLI; no automatic disk state.

Highlights

  • @TAG: field|field|... wire format on stdout; structured @ERR / @WRN / @STAT / @DEL signals on stderr.
  • memnet serve — local TCP server holds all sessions in RAM. CLI is a stateless client.
  • Session lifecycle: session open / resume / current / list / close, TTL (default 60 min, env MEMNET_SESSION_TTL_MINUTES).
  • Optional snapshots (session save --file / session load --file) — user-owned wire-format files, never written automatically.
  • Tag schema at session open (fixed EDG / LAW + user tags), strict field validation, relation allow-list.
  • Graph reads: query warm --anchor (active-only, LAW-prepended) for normal agent turns; query context for audits; query neighbors and query path for traversal.
  • Mission lifecycle via recycle labels (persistent, delete_on_settle, delete_on_expire); settled missions hidden from warm reads automatically.
  • Housekeeping: housekeep stats|stale|recyclable|dangling|orphans, housekeep prune ... --apply.
  • Advisory warnings: near_cap*, ttl_expiring, stale_in_store, stale_graph, mission_settled, fanout_clamped, etc.
  • LLM-GUIDE.md — full agent playbook (goldfish loop, settlement pattern, ID discipline, common failure modes).

Install

pip install -e ".[dev]"
memnet serve            # one terminal
memnet guide --loose    # cheat sheet for agents

Then in another terminal:

memnet session open --map-file src/memnet/examples/schema.example.txt
$env:MEMNET_SESSION = "mn_xxxxxxxx"
memnet write --file src/memnet/examples/workflow.example.txt
memnet query warm --anchor PLR01

Constraints (v1)

  • Local only — TCP loopback (MEMNET_SERVE_HOST / MEMNET_SERVE_PORT). No remote / MCP / authentication.
  • Caps configurable via MEMNET_MAX_* env vars (rows, law, relations, depth, fanout, etc.).
  • Sessions live in process memory only; on serve restart all sessions are gone. Use session save if you need persistence.

Tests

26 unit and integration tests, all passing on Python 3.11 / 3.12.

See README.md and LLM-GUIDE.md for the full agent playbook and command reference.