/\ ATFGraph /docs
README Downloads
Examples / ATFGraph
Framework reference

This article is retained from the existing framework docs. Self-hosting commands and server-admin access differ from the managed CLI workflow. Start with Get started for the installed product.

Memory lab

Directory examples/python/memory_lab

Try session memory, fixed vectors and change subscriptions without a model. Prepare the SDK and CLI from the repository root:

Agent node label memory-lab, version 1.0.0.

Capabilities

CapabilityKindSignatureModuleSummary
emit_changetraversal(value: str) -> dictexamples/python/memory_lab/agent.py
recent_changesskill() -> dictexamples/python/memory_lab/agent.py
remembertraversal(session_id: str, value: str) -> dictexamples/python/memory_lab/agent.py
vector_lookuptraversal(session_id: str) -> dictexamples/python/memory_lab/agent.py

Commands

Taken from this example's own README and module docstrings.

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.md
  • examples/python/memory_lab/__init__.py
  • examples/python/memory_lab/agent.py
  • examples/python/memory_lab/agentnode.yaml
  • examples/python/memory_lab/call.py
  • examples/python/memory_lab/requirements.txt

README

Rendered from examples/python/memory_lab/README.md; the source file is not modified.

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.

ATFGraph documentationHosted workflow · Framework reference