pb.memory gives an agent domain-typed memory as graph state. The default
memory shape covers common cases; when you need memory specific to your
domain, you fork it. Default memory → your own memory shape → memory typed to your
domain.
Use the default
Out of the box,pb.memory stores and recalls memory with no setup.
| Field | What it holds |
|---|---|
content | The memory in natural language (required). |
kind | preference · decision · fact · lesson · observation · signal |
domain | The area it applies to (“sales process”, “writing style”). |
scope | agent · commons · project — who the memory is shared with. |
date_observed | When it was learned. |
source_context | Where it came from. |
expiry | Optional TTL, for memory that goes stale. |
ABOUT edge to the subject a memory concerns, and a
SUPERSEDED_BY edge when a newer memory replaces an older one.
Fork it for your domain
When the default does not fit, fork the memory shape and make it yours. It is a normal shape, so you have the full Workbench: cull the kinds you do not use, add the fields you do, rename what does not fit.Fork the default memory shape
In the Shapes Workbench, fork the memory shape into a new
draft. You inherit its fields and edges as a starting point, rather than
building memory from scratch.
Retune the types
Cull the enum values you do not need, add domain-specific ones, or add fields
(a
client_id, a confidence_basis, whatever your domain remembers).
Compile to check it.Materialize it
Materialize your memory shape to the project.