Tao Token Efficient Execution
NVIDIAOfficialCreated by NVIDIA Corporation
- Skill
- Workflow
- Agent tooling
- Apache-2.0
- Medium risk
- Has scripts
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
The TAO Token-Efficient Execution kit optimizes agentic workflows by replacing long, context-heavy conversations with a series of fresh, stateless headless sessions. By compiling a skill into discrete 'stage cards' using a strong model, the system enables smaller, more cost-effective models to execute complex tasks reliably. State is maintained on disk rather than in chat history, significantly reducing token consumption and context window pressure. The kit includes a bash-based driver for orchestration, harness adapters for tool interception, and a structured contract for state management.
What it does
- Compiles complex agentic workflows into a series of discrete, stateless stage cards.
- Executes workflows using fresh agent sessions to minimize context window usage.
- Maintains persistent state on disk through a defined contract, avoiding reliance on chat history.
- Uses a bash driver to manage stage routing, job waiting, and error handling.
- Provides harness adapters to record executed commands and guard against known failure modes.
- Enables the use of smaller, more efficient models for executing pre-compiled workflows.
When to use it
- When a specific agentic workflow needs to be run repeatedly.
- When reducing token costs and context window usage is a priority.
- When the target model has a limited context window.
- When you need to ensure deterministic execution of a multi-stage process.
- When you want to avoid the performance degradation associated with long, single-session conversations.
Advantages
- Significant reduction in token consumption (measured 67-91% reduction).
- Lower peak context requirements (3-5x reduction).
- Improved reliability by using pre-compiled, verified stage cards.
- Stateless execution prevents model drift and context-related errors.
- Clear separation between the one-time compilation cost and the efficient execution phase.
Usage examples
- “Compile this skill into cards for token-efficient execution.”
- The agent reads the skill and workspace, then generates a set of stage cards and a driver configuration to enable stateless, low-token execution.
- “Run this workflow on a small model using the card pack.”
- The bash driver initiates the workflow, executing one stage card per session and managing state via on-disk contracts.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/nvidia/tao-token-efficient-execution/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip tao-token-efficient-execution.zip -d .agents/skills
Documentation by NVIDIA Corporation
TAO Token-Efficient Execution
Run a staged TAO workflow as a series of fresh headless agent sessions — one stage card per session — instead of one long conversation. State lives on disk, never in chat history, so no session ever rereads the run's past.
Measured on real workflows (same tasks, same outcomes, billed tokens):
| Workflow | One long conversation | Card execution | Peak context |
|---|---|---|---|
| DEFT AOI loop | 9.6M | 2.5M (-74%) | 242k → 59k |
| AutoML (VCN classify) | 5.8M | 0.5M (-91%) | 198k → 42k |
| HuggingFace finetune | 1.7M | 0.5M (-67%) | 119k → 42k |
The mechanism: an agent API is stateless, so a long conversation resends its entire history with every message — by mid-run that is ~100k+ tokens of skill text, spec edits, and training logs reread on every tool call, of which the current step needs ~3k. Cards make each step's 3k explicit and drop the rest.
The three layers
Core (harness-agnostic) — stage cards (markdown, env-var contract), a bash driver (stage routing + job waiting), and on-disk state contracts (
references/CONTRACTS.md).Harness adapters (
adapters/) — guard + recorder implemented per harness: hooks for Claude Code, extensions for Pi. Same logic, ~150 lines each. Guards block known dead ends before tokens are burned; the recorder appends executed commands tocommands.logso later sessions reuse instead of re-derive.Card packs (per application skill) — compiled cards living next to the skill they were authored from, e.g.
skills/applications/tao-run-deft-aoi/cards/andskills/applications/tao-run-automl/cards/. Each pack ships its owndriver.shandREADME.md(version pin, required env, how to run).
Cards shrink the model's job; they don't remove it. The driver owns routing and waiting (deterministic), helper scripts own state commits (deterministic), and the model executes one pre-planned stage: run verbatim commands, read a gate table, decide pass/fail from real output, fill in the one dynamic value. If a stage ever becomes 100% deterministic, graduate it out of the card into the driver or a helper script.
Quick start — run a shipped card pack
# plugin installs export TAO_SKILL_BANK_PATH automatically; standalone users set it first:
export TAO_SKILL_BANK_PATH=/path/to/tao-skill-bank
# one-time: scaffold ~/.tao-kit/kit.env and check harness prerequisites
bash "$TAO_SKILL_BANK_PATH/skills/core/tao-token-efficient-execution/scripts/install.sh"
# edit ~/.tao-kit/kit.env: set WS (and VENV for the AutoML pack) and MODEL;
# export your provider's API key in your shell — never put it in kit.env.
# then launch a pack driver detached (leave stderr attached: config errors print immediately):
nohup bash "$TAO_SKILL_BANK_PATH/skills/applications/tao-run-automl/cards/driver.sh" > /dev/null &
# monitor
tail -f ~/.tao-kit/automl/driver.logThe driver waits while jobs run (activity-based, not process-based), fires one fresh session per stage, halts on committed errors (no auto-retry — an operator decides), and exits 0 only after verified completion. DEFT prepares its inference handoff and passes the completion audit; AutoML requires its DONE marker with no trailing failure. Round-cap exhaustion exits nonzero.
Starting a pack driver is side-effecting work: complete the
tao-launch-workflow gate (platform, credentials, image, datasets, launch
review) before launching it, exactly as for in-conversation execution. Pi guards are
not an OS sandbox: use an isolated trusted worker, not a workstation containing
unrelated credentials (see adapters/pi/README.md).
Quick start — author a pack for another workflow
One authoring session with a strong model compiles the skill into cards (measured: ~10 minutes, one-time cost; every later run executes them):
Read
references/authoring_prompt.md(the round-0 contract) andreferences/authoring_prompt_v2.md(rules distilled from measured small-model failures: one command per step, mechanical state gates, exact artifact paths, explicit termination, bounded self-repair).Fill in run parameters — everything concrete for the target machine. Whatever you leave out, execution sessions will burn tokens rediscovering.
The authoring session reads the skill + inspects the workspace + writes cards into
skills/applications/<skill>/cards/. It must NOT run the workflow.Copy a shipped pack's
driver.shand edit its three config points: the stage→card routing table, theworking()predicate, and the paths block. (templates/driver.template.shis the harness-portable skeleton.)
references/CARD_AUTHORING.md reconstructs a real authoring session play by
play.
Model floor (measured, execute-side)
Authoring always needs a strong model. Execution was measured across sizes:
| Model class | Card execution | Notes |
|---|---|---|
| Frontier (e.g. Claude) | flawless | reference bar: 0 guard fires, clean labels |
| ~400B MoE | near-flawless | correct results; a few guard saves |
| ~35B MoE | workflow-dependent | AutoML clean end-to-end; DEFT completed but with sloppy stage labels |
| ~30B dense w/o tool discipline | below floor | fabricated results, loops; guards catch but cannot fix |
Raw-skill execution (no cards) did not complete honestly on ANY of the small models measured — aborts, protocol violations, or falsely declared success. Cards are what make small-model execution possible, not a minor optimization.
Report, don't patch: when an execution model fails a card, report it and stop (the driver's no-auto-retry halt enforces this). Never edit cards or state to cover a model's mistakes; only genuine card-authoring defects get fixed, explicitly.
Files
| Path | What |
|---|---|
references/CONTRACTS.md | progress log, STAGE_DONE, commands.log, env contract |
references/authoring_prompt.md / _v2.md | card compilation prompts |
references/CARD_AUTHORING.md | a real authoring session, annotated |
templates/driver.template.sh | driver skeleton (three config points) |
templates/kit.env.template | per-host config (~/.tao-kit/kit.env) |
adapters/pi/, adapters/claude-code/ | guard + recorder per harness |
scripts/install.sh | prerequisite check + kit.env scaffold |
scripts/analyze_usage.py | per-session token accounting from session JSONL |
scripts/smoke_test.sh | no-GPU adapter test (guard, recorder, accounting) |
Files
- ATTRIBUTION.mdAdded by AutoGineer957 B
- BENCHMARK.md7.3 KiB
- LICENSELicence file added by AutoGineer11.2 KiB
- SKILL.md7.4 KiB
- adapters/claude-code/README.md1.3 KiB
- adapters/claude-code/hooks/guard.template.shScript1.1 KiB
- adapters/claude-code/hooks/record.template.shScript860 B
- adapters/claude-code/settings.template.json905 B
- adapters/pi/README.md3.7 KiB
- adapters/pi/guard.tsScript10.5 KiB
- adapters/pi/nvidia-provider.tsScript4.9 KiB
- adapters/pi/recorder.tsScript3.8 KiB
- config/skillspector-baseline.yaml2.0 KiB
- evals/evals.json2.8 KiB
- references/CARD_AUTHORING.md4.4 KiB
- references/CONTRACTS.md4.4 KiB
- references/authoring_prompt.md2.2 KiB
- references/authoring_prompt_v2.md3.0 KiB
- scripts/analyze_usage.pyScript6.0 KiB
- scripts/install.shScript2.8 KiB
- scripts/smoke_test.shScript4.6 KiB
- skill-card.md5.5 KiB
- skill.oms.sig8.8 KiB
- templates/driver.template.shScript5.2 KiB
- templates/kit.env.template1.8 KiB
references/CONTRACTS.md
Kit contracts — the on-disk state that replaces chat history
Every contract here exists so a fresh session (or the driver, which is plain bash) can answer "where are we?" without any conversation memory.
Run directory ($RD)
One directory per run, created under $WS/results/. Everything a session
learns that later sessions need MUST land in $RD. The driver selects the
newest run dir matching the pack's glob that is newer than its launch marker —
runs never share state.
Progress marks — how the driver routes
Two equivalent conventions; a pack uses exactly one:
Simple packs (
progress.log): each completed stage appends one line,<stage> ok(failures append<stage> FAIL). The driver routes on the lastokline only — error lines never advance routing, and a trailingFAILhalts the driver (no auto-retry; an operator decides).Skill-tooling packs (
loop_log.jsonl): when the application skill ships its own commit machinery (e.g. DEFT'scommit_stage.py, which validates evidence before writing), ALL state writes go through it and the driver routes on the laststatus=="ok"entry. Cards never hand-roll state writes that the skill's tooling owns.
STAGE_DONE <card-id> — explicit termination
Every card ends with: print exactly STAGE_DONE <card-id> as the final
message and stop. Measured failure this prevents: models that cannot end a
turn burn hundreds of messages per session. The harness adapter enforces a
hard tool-call budget (PI_KIT_TURN_BUDGET) as the backstop.
commands.log — reuse, don't re-derive
The recorder adapter appends every substantive executed command (with a
timestamp) to $RD/commands.log. Guard-blocked commands are never recorded.
The driver injects the tail into each session's prompt; cards instruct the
executor to reuse recorded commands instead of re-deriving them. This is the
single biggest defense against small-model drift: the correct command exists,
so the model's job is to run it, not to reinvent it.
Environment contract
Cards reference ONLY driver-exported constants ($WS, $RD, $ITER,
container images, mount strings, script paths). Two hard rules, both from
measured failures:
The executor's shell is fresh per tool call — variables set in one call do not survive to the next. Anything that must persist is either a driver export or a file in
$RD.Cards never contain
<placeholders>the executor must fill by searching. Exact paths, exact flags, one copy-paste command per step.
Per-host values (workspace, venv, model, images) come from
~/.tao-kit/kit.env, sourced by every pack driver. Credentials are never
written anywhere — drivers check presence of the API key variable and abort
with the export instruction if missing. Pi keeps provider credentials in the
harness process but strips them and arbitrary startup hooks from bash tool
subprocesses. See the adapter README for the isolated-worker requirement.
Driver obligations
Route on the last committed ok mark (see above), mapping stage → card.
Wait on real activity (container CPU%, runner processes), not on the agent — cards launch long jobs detached and end the turn. Idle zombie containers must not count as work (check CPU, not existence).
Halt on committed errors and on N consecutive no-progress rounds. Check failure status before any completion marker. Never auto-retry a committed failure. Exhausting the round cap must return nonzero; only verified completion returns zero. For DEFT, loop_stop alone is insufficient: the driver must prepare the inference handoff and pass the completion audit.
Snapshot state into the prompt (progress tail, commands.log tail) so the fresh session starts with everything it needs and nothing more.
Write nothing into the skill bank checkout — sessions and driver logs go to
~/.tao-kit/<pack>/.
Guards — block dead ends before tokens burn
Guards are advisory-with-teeth: they block a tool call and return a reason that tells the model WHY and WHAT TO DO INSTEAD. Framework guards (turn budget, near-duplicate-command loop breaker, no-fabricated-results verification, destructive-command safety net) ship in the adapters and are env-configurable. Workflow guards (GPU quirks, disk headroom, container CLI quirks) are added one per discovered failure mode — see the adapters' README for real examples and the pattern to copy.
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Declares allowed tools, Needs an API key, Needs Python, Needs Node.js
The author says: Requires bash, jq, Python 3.10+, and a headless agent harness with tool interception (see adapters/ for supported versions). The shipped card packs additionally need docker and the prerequisites of their application skill.
Security
What our scanner noticed· Medium risk
- Large base64-encoded blobs
- References to credential files
- Scripts that your agent may run
This skill includes scripts that your agent may run. Read them before you use it.
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Created by
- NVIDIA Corporation
- Publisher
- NVIDIA (Official)
- Source
- NVIDIA/skills · skills/tao-token-efficient-execution · commit fce3cca
- Licence
- Apache License 2.0 (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE-APACHE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by NVIDIA Corporation or NVIDIA.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download tao-token-efficient-execution.zip