Memory lab
Try session memory, fixed vectors and change subscriptions without a model. Prepare the SDK and CLI from the repository root:
Capabilities
| Capability | Kind | Signature | Module | Summary |
|---|---|---|---|---|
emit_change | traversal | (value: str) -> dict | examples/python/memory_lab/agent.py | |
recent_changes | skill | () -> dict | examples/python/memory_lab/agent.py | |
remember | traversal | (session_id: str, value: str) -> dict | examples/python/memory_lab/agent.py | |
vector_lookup | traversal | (session_id: str) -> dict | examples/python/memory_lab/agent.py |
Commands
atfg server start
atfg traverse memory-lab.emit_change --in '{"value":"changed"}'
atfg traverse memory-lab.recent_changes --in '{}'
cargo build --bin atfgraphd --bin atfg
python -m atfgraph.worker --module examples.python.memory_lab.agent:app
python -m examples.python.memory_lab.call remember '{"session_id":"demo-a","value":"first"}' --session demo-a
python -m examples.python.memory_lab.call remember '{"session_id":"demo-a","value":"second"}' --session demo-a
python -m examples.python.memory_lab.call vector_lookup '{"session_id":"demo-a"}' --session demo-a
python -m pip install -e ./python
Files
examples/python/memory_lab/README.mdexamples/python/memory_lab/__init__.pyexamples/python/memory_lab/agent.pyexamples/python/memory_lab/agentnode.yamlexamples/python/memory_lab/call.pyexamples/python/memory_lab/requirements.txt
README
Try session memory, fixed vectors and change subscriptions without a model. Prepare the SDK and CLI from the repository root:
python -m pip install -e ./python
cargo build --bin atfgraphd --bin atfg
export PATH="$PWD/target/debug:$PATH"
atfg server start
Use the default local server and its /ui/ Console, or set ATFGRAPH_SERVER and ATFGRAPH_API_KEY for another endpoint.
python -m atfgraph.worker --module examples.python.memory_lab.agent:app
# Another terminal:
python -m examples.python.memory_lab.call remember '{"session_id":"demo-a","value":"first"}' --session demo-a
python -m examples.python.memory_lab.call remember '{"session_id":"demo-a","value":"second"}' --session demo-a
python -m examples.python.memory_lab.call vector_lookup '{"session_id":"demo-a"}' --session demo-a
atfg traverse memory-lab.emit_change --in '{"value":"changed"}'
atfg traverse memory-lab.recent_changes --in '{}'
The second call should return previous: first. Use another session name such as demo-b in both calls to check isolation. Server-held values and vectors survive a worker restart. Fixed three-dimensional vectors rank blue first without embeddings from a model. The worker polls the durable change feed, but its last 100 diagnostic events are process-local; call recent_changes after a write to inspect them.