MemNet
Mission working memory for LLMs. A named session graph (GQL node/vertex, edge/relationship, property) that agents pin and mutate — not a notepad in chat, and not the search library.
MemNet sits between LLM call pipelines and data search (MN-REQ-00). Corpus lookup stays on the host (grep, ingest, optional RAG); it may propose locators. In the session, kinds/tags are overlapping cues; recall is serial — cue, then a bounded pin_map neighbourhood. It is not GraphRAG, not a vector store, and not AgensGraph.
This repo ships the engine + generic MCP only. Product shape: docs/SHAPE.md. Pinned role: working set of a few technical documents (atoms and locators, not PDF bytes) plus live TSK/USR/MOD, re-read fast. Tens of MiB typical; hundreds of MiB still in role; gigabytes = RAG/cabinet.
Package memnet-llm (CLI memnet). Python ≥ 3.11. Hatch 0.19.11; last published PyPI wheel is memnet-llm==0.19.6 until this cut is uploaded (0.19.11 honesty c: catalog cross-session satisfy locators + CousinSysMLEdge mustNotInventUploadBind). 1.0 stays unclaimed. SemVer meaning (a.b.c): docs/ROADMAP.md.
Install + quick CLI
pip install memnet-llm
# or pin published: pip install memnet-llm==0.19.6
# optional extras (drivers only — not an AgensGraph server):
# pip install 'memnet-llm[mcp]'
# pip install 'memnet-llm[agensgraph]'
# contributors: pip install -e ".[dev,mcp]"
CLI needs a serve process. Prefer local IPC; TCP is the fallback.
# Terminal 1
export MEMNET_IPC_SOCKET=/tmp/memnet.sock
memnet serve --ipc
# Terminal 2 (same MEMNET_IPC_SOCKET)
memnet session open --map-file parts/common/memnet/memnet/examples/schema.example.txt
# demo-world map for tests; warehouse GQL below is illustrative (not that world's field list)
# stderr prints MEMNET_SESSION=mn_… — pass it as --session (serve proxies argv, not your shell env)
memnet mutate --session mn_… --stdin <<'EOF'
CREATE (t:TSK {goal:'Clear warehouse', status:'in_progress'})
CREATE (n:NPC {role:'helper', status:'active'})
MATCH (n:NPC {role:'helper'}), (t:TSK {goal:'Clear warehouse'})
CREATE (n)-[:helps {note:'labour'}]->(t)
EOF
memnet query find --session mn_… --kind TSK --limit 8
memnet query pin-map --session mn_… --kind TSK --locator 'goal=Clear warehouse' --depth 2
Shaped pin map (illustrative; nickname id only if set):
(:TSK {goal: 'Clear warehouse', status: 'in_progress'})
(:NPC {role: 'helper', status: 'active'})
(:NPC {role: 'helper'})-[:helps {note: 'labour'}]->(:TSK {goal: 'Clear warehouse'})
Create by labels+properties (CREATE () is legal). leftover id:'NEW' mint / @ID: AssignedIdMap is leftover, not product. Each turn pin_map(q) (or skip); drop prior maps from the prompt; leftover --anchor is a nickname cue. The agent dialect is GQL only (openCypher-shaped). Wire SSOT: docs/grammar/gql-wire-profile.md. Layer accept is dead.
MCP in-process (memnet-mcp) does not need serve — that's the usual single-agent path.
Session pipe
Handoff between modules/agents is the sessionId (treat it as a secret capability). The peer re-pin_maps — don't dump the graph into chat. Keep working/mission memory distinct from other product handles (e.g. a company store id); mixing those is an app concern, not MemNet's job.
Import absorb vs shared session
- Path A — same
sessionId; peers just re-pin_map. No import. - Path B — separate member session; lead absorbs a bounded slice via
memnet import-slice(pattern match, not MERGE-by-id). leftoverkeep/reject/remintid_policyis leftover, not product. That's absorb into the lead SSOT, not append. ImportGuard / CheapLlmImportGuard is a user-selectable optional soft LLM (feature stays; not deprecated). Absorb works with the key unset. SetMEMNET_IMPORT_GUARD_API_KEYon serve to activate (optionalMEMNET_IMPORT_GUARD_BASE_URL/MEMNET_IMPORT_GUARD_MODEL).--no-guardskips the soft pass for one call. Hard ImportAbsorb always runs. Teach:docs/LLM-GUIDE.md.
ACL + transport
CapsPolicy ACL (shipped; off by default until session acl-enable): who (caller) / pin_map vs mutate / WorkerWriteScope hard reject / optional missionId+lease bind.
RSV neighbourhood reserve exists (memnet reserve / extend / release; llm_id + TTL; pin map may show ## Reserves).
Transport: in-process MCP default (one graph per process). Shared graph: memnet serve --ipc (MEMNET_IPC_SOCKET) or TCP memnet serve (127.0.0.1:18765). Multitask / parallel workers need a shared serve — not default in-process.
Durable: optional client memnet-llm[agensgraph]; the cabinet is external and not vendored. 0.7 is adapter + operator round trip (no runtime caller) (liveCabinetClaimed); CI skips unless MEMNET_AGENSGRAPH_URL is set. Neo4j is retired (#187). MEMNET_NEO4J_* is ignored (one log warning); the engine still starts.
Deferred (honest)
- Hosted AgensGraph as a product service (operator runs the server; this repo does not vendor it)
- N-server session pipe (#47)
- SysML file reverse / pin-map re-ingest (MN-REQ-11.5 SHOULD / #66) — 0.19 writes cue
pin_mapGQL out; identity merge on the way back is later - Host search / RAG as a MemNet tool — application nest only (
docs/extras/memnet-host-search-nest.md)
Links
| Doc | Role |
|---|---|
docs/LLM-GUIDE.md |
Agent playbook (GQL only) |
docs/SHAPE.md |
Product shape from the problem |
docs/grammar/gql-wire-profile.md |
GQL wire SSOT |
docs/ROADMAP.md |
Version map SSOT |
sysml-models/ |
Requirements / verify |
docs/operations/multi-agent-sessions.md |
Multitask ops |
docs/README.md |
Full docs index |
docs/cap-contract.md |
Caps a product gate can hit (refuse vs clip, exact wire) |
Layout: LAYOUT.md · AGENTS.md. Novel-writer is out: DROP-NOVEL-WRITER.md.
Licence
MIT
Metadata
Release files for memnet-llm 0.20.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 |
|---|---|---|---|---|
| memnet_llm-0.20.0.tar.gz | 449.5 kB | Without provenance | Details for memnet_llm-0.20.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| memnet_llm-0.20.0-py3-none-any.whl | Python 3 | none | any | Details for memnet_llm-0.20.0-py3-none-any.whl |
Total release size: 776.7 kB
Release files / memnet_llm-0.20.0.tar.gz
| Download URL | memnet_llm-0.20.0.tar.gz |
|---|---|
| Size | 449.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c2d4661d0012bb602df1c34f029d1c0d9116df418465b3cfb09f57ee7f434451
|
|
BLAKE2b-256 checksum How to use checksums |
0af06a6f8c98a330081ad34354853ae236ab63fa0b8f9dae4d25c701fe95b230
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.5
|
Release files / memnet_llm-0.20.0-py3-none-any.whl
| Download URL | memnet_llm-0.20.0-py3-none-any.whl |
|---|---|
| Size | 327.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4bece0e8e07e0844d60fe097e24bb1b2ebca41127a17b48c0516a0772d924df8
|
|
BLAKE2b-256 checksum How to use checksums |
95e9d3a2c24d23df7c2664ce836c5b5431274363635aeb97b7f5367d4df03af8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.5
|
Security for memnet-llm 0.20.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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.