🧰Scaffold the Talus Agent Package
This page generates the on-disk shape of a Talus Agent Package (TAP) skill and replaces the scaffolded Move stub with a real state module that holds a SUI treasury and the per-vertex witness object the on-chain Tool will be registered against.
1. Generate the scaffold
Pick a working directory and run:
nexus tap scaffold --name "tutorial transfer" --target .
cd tutorial-transferThe released scaffold writes four files under tutorial-transfer/:
tutorial-transfer/
├── dag.json # workflow definition (we'll edit later)
├── skill.tap.json # skill config (we'll edit later)
└── tap/
├── Move.toml # the TAP Move package manifest
└── sources/
└── tutorial_transfer.moveThe scaffolded tutorial_transfer.move is a single drop witness with an init_for_test helper — enough to compile, but nothing the workflow can actually call. This release scaffold does not create a Nexus-calling test. Add the explicit local test arrangement described in Build the TAP Move package before using the released published-bytecode harness.
Scaffold boundary
nexus tap scaffold creates the TAP package contract: edition 2024, the required TAP version/environments shape, and no [addresses] section. The TAP validator rejects an [addresses] section.
This is not the same workflow as nexus tool new --template move, which creates a general Move Tool scaffold with version = "1.0.0", edition 2024.alpha, MVR dependencies, and no [addresses] table; its default Standard ABI differs from the TAP module contract. Do not copy either template wholesale into the other. Use Build an On-Chain Tool for the general Tool path and the TAP CLI reference for TAP commands.
2. Review tap/Move.toml and update the Nexus dependencies
The scaffold ships with the six packages used by the complete TAP surface: nexus_primitives, nexus_interface, nexus_tool, nexus_registry, nexus_workflow, and nexus_scheduler. This tutorial directly uses the first two, while the remaining entries keep the package ready for registry, workflow, and Task composition. Remove a dependency only after the Move build proves it is unused.
The scaffold command does not fetch or stage these dependencies. The six public installation records are nexus-primitives, nexus-interface, nexus-tool, nexus-registry, nexus-workflow, and nexus-scheduler. Commit Move.lock and match its resolved addresses to the selected network. For offline interface/ABI inspection, use the public Nexus Move Packages source and keep its six direct package directories together with the transitive packages/kernel closure when required. Those copied packages contain native declarations and must not be published or treated as executable mocks; kernel is supporting closure rather than a direct application dependency, and neither policy nor kernel has a reviewed MVR package record.
The scaffold writes an [environments] table pre-filled with the public-testnet chain id, which is what this guide targets:
Leave that as-is unless you're publishing to a different network. If you are, replace the row with <env_alias> = "<chain-id>" for your target network (the alias must match a name in sui client envs, and the chain id is what sui client chain-identifier prints while that env is active).
The end result looks like:
3. Replace the scaffold's Move source
The interesting work is in tap/sources/tutorial_transfer.move. Replace its contents with the module below. The state object holds a SUI treasury that the vertex Tool drains on each execution, plus the per-vertex witness whose UID feeds nexus tool register onchain --tool-witness-id and satisfies the runtime UIDRequirements value.
Key things to notice:
TutorialStateis shared (public_share_object) so the workflow and the treasury funder can both reach it.TransferVertexWitnessis stored insideTutorialStateso itsUIDis stable for the package's lifetime — the on-chain Tool registers against it once and satisfies it on every successful call.take_treasuryispublic(package). The siblingtransfer_vertexmodule (next page) is the only caller; nothing outside thetutorial_transferpackage can extract the coin directly.
The release scaffold has no Nexus-calling test module. Add the explicit move-tests-published/ arrangement described in Build the TAP Move package when you need a local published-bytecode check; keep those tests outside the release TAP package so the release scaffold and its sui move test boundary remain unchanged.
4. Validate locally
Run the local metadata validator before going anywhere near the chain:
The validator resolves dag_path relative to --config and resolves the Move package at the sibling tap/ directory. It checks the config, DAG JSON, manifest, and source layout; it does not compile Move code. You should see:
Build and test the package separately from the directory that actually contains Move.toml:
The metadata validator and Move build are local, so iterations are fast. The plain sui move test command here is limited to Nexus-free tests in the release package; it does not execute published Nexus functions. Follow Build the TAP Move package to add the explicit released published-bytecode test arrangement before publication.
What you have now
A
tap/Move.tomlandtap/sources/tutorial_transfer.movethat compile against the published Nexus deps for your network.A
TutorialStateshared object with a SUI-coin treasury, a witness object, and afund_treasuryentry function.A
skill.tap.jsonanddag.jsonstill in their scaffold-default shapes — we'll edit those two pages from now.
Last updated

