Share a recorded path
Export a run's recorded steps with atfg share. The result is one file that you can archive, inspect, screenshot or share.
The command writes the artifact locally. It does not upload it, create a hosted link or require a separate account.
$ atfg share 7720ccc2-e96d-436b-b06b-39b51bb67ad5
/home/you/path-7720ccc2-e96d-436b-b06b-39b51bb67ad5.html
2 step(s), succeeded — 16405 bytes
Open the HTML file from disk in a browser. Reading the exported file does not require access to the graph server.
Using it
| Flag | What it does | |
|---|---|---|
<ID> | The traverser whose path is exported. Any step id works: the export follows the path the graph server returns for it. | |
-o, --out PATH | Where to write. Default path-<id>.html (.json with --format json) in the working directory. | |
| `--format html\ | json` | html (default) is the readable, self-contained document. json writes the versioned bundle on its own. |
--title TEXT | Names the path. Default: path of <target> taken from the entry step. | |
--redact | Replaces every input, output and error preview with [redacted] before anything is written. | |
--force | Required to overwrite an existing file. Without it the command stops and writes nothing. |
Use the usual global settings for server, key and request timeout: --server, --api-key, ATFGRAPH_SERVER, ATFGRAPH_API_KEY and --timeout. Add --json for a machine-readable export summary:
$ atfg --json share $ID --out audit.html
{
"id": "7720ccc2-…",
"root_id": "7720ccc2-…",
"out": "audit.html",
"format": "html",
"bundle_version": 1,
"bytes": 16405,
"steps": 2,
"steps_omitted": 0,
"status": "succeeded",
"redacted": false
}
Export uses your existing read permissions. It requests GET /api/v2/traversers/{id}/path and GET /api/v2/usage?root_id=… with your credentials. A path you cannot read cannot be exported.
What is in the artifact
The HTML artifact contains these sections in order:
- The title, run ID, export time and overall status.
- Totals for steps, elapsed time, cost and tokens.
- A tree view of the execution graph, linked to step details.
- A card for each step with IDs, kind, version, attempt, start and finish times, duration, model, cost, error code, and expandable input, output and error previews.
- Caveats specific to the exported data.
- A versioned JSON bundle embedded as data in
<script type="application/json" id="atfgraph-path-bundle">.
Apart from the export timestamp, the embedded bundle has the same bytes as the --format json output. Programs can read either format.
Bundle schema, version 1
{
"bundle_version": 1,
"kind": "atfgraph.path-share",
"product": "ATFGraph vNext",
"path_id": "…", "root_id": "…", "title": "path of travel.plan",
"generated_at": "2026-09-15T04:11:07.123Z",
"generated_by": "atfg share (ATFGraph vNext 0.1.0)",
"redacted": false,
"limits": { "preview_limit_bytes": 2048, "max_nodes": 1000, "nodes_omitted": 0 },
"totals": {
"steps": 2, "status": "succeeded",
"status_counts": { "succeeded": 2 },
"wall_clock_ms": 219,
"cost_usd": 0.0125, // null = unknown, never a stand-in for 0
"cost_complete": true,
"total_tokens": 15
},
"nodes": [ { "id": "…", "step_id": "…", "parent_id": null,
"target": "travel.plan", "label": "travel", "capability": "plan",
"version": "1.0.0", "kind": "traversal",
"status": "succeeded", "attempt": 1, "max_attempts": 1,
"created_at_ms": 0, "started_at_ms": 0, "finished_at_ms": 0,
"duration_ms": 219,
"input_preview": { "state": "unavailable", "text": null, "truncated": false, "source_bytes": null },
"output_preview": { "state": "available", "text": "{…}", "truncated": false, "source_bytes": 434 },
"error_preview": { "state": "absent", "text": null, "truncated": false, "source_bytes": null },
"error_code": null, "model": null, "cost_usd": null, "total_tokens": null } ],
"edges": [ { "from": "…", "to": "…" } ],
"notes": [ "…" ]
}
bundle_version identifies this data contract. A breaking change to the structure requires a new version.
Preview states: Each preview explains whether data was empty, missing, unavailable or removed. Those states have different meanings:
| State | Meaning |
|---|---|
available | Text is present (possibly truncated; truncated and source_bytes say so). |
empty | The step recorded this field, and it was empty. |
absent | The step recorded nothing here — no output yet, or no error at all. |
unavailable | The read API does not carry this field, so the export could not include it. |
redacted | Present, and deliberately stripped by --redact. |
Missing prices: If the server supplies no cost or model, the bundle uses null and the page shows unknown. A recorded, priced zero-cost call shows $0.0000. Missing usage does not become a zero price. If only some calls in a step are priced, its overall cost stays null because the known subtotal is incomplete.
Safety
Agent outputs can contain untrusted text. The exporter applies these controls when it builds the file:
- No executable JavaScript: The only
<script>element contains JSON data. Visible content is rendered HTML, with native<details>panels. - No network dependencies: Assets and styles are local to the file. It contains no remote assets, CSS imports or
url()references. Navigation uses#step-…fragments. Adefault-src 'none'Content Security Policy further restricts browser activity. - Escaping: Text is HTML-escaped. In embedded JSON,
<,>,&, U+2028 and U+2029 become\uXXXX, preventing a payload such as</script>from ending the data block. Unknown status values display asunknownrather than becoming CSS class names. - Text cleanup: Untrusted C0/C1 control characters and Unicode bidirectional or invisible formatting characters are removed to limit terminal and display-order tricks.
- Size limits: Previews are capped at 2 KiB and exports at 1000 steps. Truncation is recorded; much larger source payloads do not expand those limits.
- No connection credentials: The exporter writes response data rather than request headers. It does not copy the API key, bearer token or server address from its connection settings.
- Local output: The command has no upload,
--publicoption or automatic browser launch.
Review payload content before sharing. Rendering protections do not remove sensitive information that an agent returned. Use --redact when input, output and error previews should be stripped. The exported graph, statuses, timings, attempts, token counts and error codes remain useful for diagnosis.
Not available over HTTP
Export is a CLI feature. There is no GET /api/v2/traversers/{id}/share endpoint. To produce this artifact from another application, invoke atfg share.
Known gap: step inputs
Input previews are currently marked unavailable, with an explanation in the HTML and bundle notes. The path read API returns status, timing, output and error, but does not expose step inputs. In src/store.rs, Trav::to_json omits input_json. Inputs reach workers through worker/claim, which is a lease operation rather than a read API.
Exposing inputs requires an input field in the path-item contract. The exporter already tolerates and reads that field, so it can show previews when the API supplies it.