Comprehensive framework manual
Start here to choose a guide for your task. The atfg CLI starts local servers, manages node packages, submits work and reads results. The Python SDK lets application teams write nodes and call the same shared server. This page also collects common commands and exit codes.
| Component | Purpose | Command |
|---|---|---|
| Graph server | Routes work and stores paths | atfgraphd |
| CLI | Starts servers and interacts with agent nodes | atfg |
| Python worker | Runs your node and connects to the server | python -m atfgraph.worker |
A graph server schedules work and stores its record. An agent node registers a label, version and capabilities: traversals coordinate work, skills conventionally perform a focused operation, and decisions return typed judgments. None must call a model. Starting a capability creates a traverser; its path records steps. atfg wait waits at the barrier until the run finishes. See Core concepts.
Reading order
- Read Overview for the platform's scope and the division of responsibilities.
- Follow Quickstart to run a server and node, submit work and inspect its path.
- Use Core concepts to understand the terms.
- Read the comparison guide when choosing how ATFGraph fits your stack.
- Choose a task guide below.
| Task | Guide |
|---|---|
| Start, configure, secure and stop the server | Run the graph server |
| Call a capability and read the result | Start a traverser and read its path |
| Write a node | Python SDK |
| Have a coding assistant write the node from a brief | Describe what you want to build |
| Build, review and deploy a node from a brief with approvals on one path | Studio |
| Run a node detached, from a package | Package, install and run an agent node |
| Watch workers, traversers and stats from a script | Monitor over HTTP |
| Watch them in the browser | Use the web console |
| Run everything in containers on one machine | Deploy with Docker Compose |
| Run on a cluster or in Databricks | Deploy to Kubernetes, Helm or Databricks |
| Publish capabilities over MCP, A2A or HTTP | Discovery publication |
| Trace traversals with MLflow | MLflow tracing |
| Move data from an older server, back up, restore | Historical data migration and backup/restore |
- Look up details in the HTTP reference, CLI reference and Troubleshooting.
Which side are you on?
Calling existing agents. You need the graph server URL and the credentials its operator provides. Submit work and read results through a client library, CLI or Console. You do not need to host a worker to call a node that another team already operates.
export ATFGRAPH_SERVER=http://127.0.0.1:18880 # or a remote server
export ATFGRAPH_API_KEY=... # required off loopback
atfg ls
atfg traverse co-consult.consult --in '{"request":"A relaxed family trip to Tokyo"}' --new-session
Building agents. You write the node's behavior and run an outbound worker. It registers with the server, claims tasks for its label/version, renews leases, reports progress and returns results. Standard workers open no inbound port. Run one in your terminal with atfg dev, install a package with atfg install and atfg run, or use a deployment target. The shared server provides the execution services; your team supplies code, configuration and ongoing node operation.
CLI command table
Common global flags are --server/-s (ATFGRAPH_SERVER, default http://127.0.0.1:18880), --api-key/-k (ATFGRAPH_API_KEY, sent as X-API-Key), --json, --timeout <s> (HTTP timeout, default 30), and --state-dir (ATFGRAPH_VNEXT_HOME). See the generated CLI reference for the full command set and options. A platform proxy may require its own credential separately.
| Command | What it does | |||
|---|---|---|---|---|
server start [--listen] [--config] [--database-url] [--daemon] [--foreground] [--wait] | Start the sibling daemon | |||
server status [--listen] | Pid record, process state, /health, build identity from /api/v2/server | |||
server stop [--listen] [--grace] | SIGTERM the recorded pid after checking it is still atfgraphd | |||
ls [LABEL] | Elements: one row per traversal or skill with kind, timeout and attempts | |||
ps [--status S] | Traversers with target, status, root, created time and elapsed | |||
| `traverse TARGET [--in JSON \ | --in-file PATH] [--node-version V] [--session ID \ | --new-session] [--idempotency-key K] [--async] [--wait-timeout S]` | POST /api/v2/traversers; without --async, wait at the barrier and print the result | |
wait ID [--wait-timeout S] [--interval-ms N] | Poll until terminal | |||
show ID | One traverser's fields, output and error | |||
cancel ID | POST …/cancel; children are cancelled by the server | |||
path ID | Steps and attempts from GET …/path | |||
share ID [--out PATH] | Export a recorded path as a self-contained offline file | |||
config validate [PATH] [--strict] | Validate a server configuration file | |||
dev --module M:A [--python P] [--start-server] [--expect-label L] [--ready-timeout S] [--grace S] [-- worker args] | Run python -m atfgraph.worker attached to the terminal; checks the interpreter can import atfgraph first; reports registration; Ctrl-C drains, a second Ctrl-C or the grace period kills | |||
doctor [--python P] | Binaries, state dir, Python SDK, docker/kubectl/helm/kind/databricks presence, graph server identity | |||
| `install SOURCE [--path SUB] [--python P] [--sdk DIR\ | WHEEL] [--force]` | Install an agent node package (directory, .tar.gz from package, or git URL https://host/repo[//sub][@ref]) into <state>/packages/<name>/ with its own venv | ||
run NAME [--wait S] [--capacity N] [--start-server] | Start the installed node as a detached worker, log to <pkg>/worker.log, wait until its label is registered (exit 2 if not in time) | |||
stop NAME [--grace S] [--kill] | SIGTERM the recorded pid only if it is still that worker; it drains first | |||
logs NAME [--tail N] [-f] | Show or follow the worker log | |||
list | Installed packages with process state, pid and the version registered on the server | |||
uninstall NAME | Remove the package directory (refuses while running) | |||
package [DIR] [--out target/dist/packages] | Build <name>-<version>.tar.gz + .package.json (per-file SHA-256, module, git commit) and update SHA256SUMS | |||
migrate … | Migrate history, back up, verify or restore a store; see migration | |||
skill install … | Install a bundled coding skill into Claude Code or Codex; see build from a brief | |||
docs [--port P] [--no-browser] [--python P] | Serve this documentation site on loopback and open it | |||
| `deploy validate [--path deploy] [--target all\ | compose\ | kubernetes\ | helm] [--require-tools]` | Run the local validation commands; missing tools are skipped unless required |
| `deploy scaffold DIR --label L --module M:A [--target docker\ | kubernetes] [--force]` | Write worker deployment files for an agent node project | ||
deploy compose up --name N [--file F] [--port P] [--api-key-env VAR] [--image-tag T] [--build] [--wait S] [--expect-label L] | Create or re-apply a managed Compose deployment (project atfgv-<N>), then verify /health and registration | |||
| `deploy compose status\ | logs\ | rollback\ | down --name N` | Observe versus desired state (exit 3 on drift), container logs, re-apply the previous good image tag, remove containers (--volumes, --forget) |
deploy list | Deployment records under <state>/deployments/ |
Pass named inputs as a JSON object directly to --in. Use --in-file - to read that object from stdin.
Exit codes
| Code | Meaning |
|---|---|
| 0 | Success; for traverse/wait, the traverser succeeded |
| 1 | Error: unreachable server, API error envelope (code (status): message [request id]), invalid input or config |
| 2 | Timed out waiting: still not terminal after --wait-timeout (traverse, wait), or /health did not answer in time (server start), or the daemon did not exit within --grace (server stop), or registration took longer than --wait (run) |
| 3 | The traverser reached a terminal state other than succeeded: failed, cancelled, timed_out; for deploy compose status, the observed state differs from the desired state |
Typical session
atfg ls
ID=$(atfg traverse hello.greet --in '{"name":"Ada"}' --async)
atfg ps --status queued
atfg wait "$ID" --wait-timeout 120 || echo "exit $?"
atfg path "$ID"
atfg --json show "$ID" | jq .output
Troubleshoot a running node
atfg doctor
atfg server status
atfg ls
atfg ps
atfg show <traverser-id>
atfg path <traverser-id>
atfg logs <node-name> --tail 100
If atfg ls does not show the label, check the worker process, server URL, namespace and registration logs. For a failed call, inspect the traverser and its path to find the failing step. Troubleshooting maps common messages to corrective actions.