memory#
Build and inspect kind: "memory" packages.
Overview#
agentpm memory is the CLI surface for Memory Blueprints. It currently supports:
agentpm memory buildto validate a blueprint and generate resolved contractsagentpm memory inspectto inspect a local or installed Memory package without rewriting it
The command group is diagnostic and packaging-oriented. It does not create a live store, bind a blueprint to a backend, persist records, execute lifecycle operations, or evaluate triggers.
Commands#
Build#
agentpm memory build [PATH] [--manifest <path>]Use build when you want AgentPM to:
- validate the authored blueprint and referenced source schemas
- generate one resolved contract for every declared space-and-record-type pairing
- write
memory/contracts/index.json - write
memory/build.json
Typical flow:
agentpm lint --strict
agentpm memory build
agentpm publish --dry-runInspect#
agentpm memory inspect <PATH_OR_PACKAGE> [--json]Target resolution order:
- existing local directory
- explicit local
agent.json - installed Memory package reference such as
@namespace/name@range
Accepted installed-package forms:
@namespace/name@namespace/name@0.1.0@namespace/name@^0.1memory:@namespace/name@0.1.0
inspect is read-only. It never rebuilds or repairs package state.
Build outputs#
A successful build writes:
memory/
build.json
contracts/
index.json
<space>.<record_type>.schema.jsonmemory/contracts/index.json#
The contract index inventories the generated contracts and includes, per entry:
spacerecord_typeschema_versionmodelsource_schema- generated
path - generated contract hash
memory/build.json#
The build metadata records portable authored-input and generated-output hashes so AgentPM can detect:
- never-built state
- stale authored input
- missing generated output
- modified generated output
- unsupported metadata
- inconsistent metadata
Example: build a blueprint#
agentpm init --kind memory --name conversation-continuity --description "Durable memory contract for a support assistant"
cd conversation-continuity
agentpm lint --strict
agentpm memory buildSample result:
Memory build: conversation-continuity@0.1.0
Scopes: 1
Record types: 1
Spaces: 1
Operations: 0
Contracts written: 1
Output: memory/contractsExample: inspect a local package#
agentpm memory inspect .Typical text output includes:
- package identity and paths
- normalized build status such as
fresh,not_built,stale,invalid, orunsupported - authored scopes, record types, spaces, and lifecycle operations
- generated contract inventory
- structured mismatch details when generated output is stale or malformed
Machine-readable output:
agentpm memory inspect . --jsonPublish readiness#
agentpm publish does not build Memory output for you. A Memory package must already have fresh generated files.
If authored inputs changed since the last build:
agentpm memory buildThen try publish again:
agentpm publish --dry-runCommon failure cases#
Not built yet#
Memory Blueprint is not built.
Run:
agentpm memory buildAuthored inputs changed#
inspect reports a stale state and identifies the changed source schema, manifest, or generated file where possible.
Modified or missing generated output#
inspect reports an invalid state and lists the affected generated files without rewriting them.
SDK boundary#
Memory Blueprints become useful to SDK consumers after install:
- Node:
loadMemory()andloadMemoryContract() - Python:
load_memory()andload_memory_contract()
Those SDK calls are metadata and contract loaders only. They do not provide live record CRUD or a hosted memory runtime.