Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

🚀Publish, Register, Bind

Audience: Nexus adopters and integrators.

Goal: Publish a Talus Agent Package (TAP), register its durable Tool and skill artifacts, and verify the Agent binding before execution.

Five on-chain boundaries make up this page:

  1. sui client publish publishes the Talus Agent Package (TAP) Move package and creates TutorialState.

  2. nexus tool register onchain adds the transfer Tool to ToolRegistry.

  3. nexus dag publish publishes the DAG after its Tool FQN can be resolved.

  4. nexus tap create-skill-artifact derives the input commitment and writes artifact.json.

  5. nexus tap bind creates a Talus Agent and registers its first skill atomically.

Each step records what the next one needs. Capture the IDs as you go. A fresh on-chain Tool cannot use the one-command nexus tap publish-skill path because Tool registration needs the package ID while DAG publication needs the registered Tool; the explicit sequence below breaks that dependency cycle.

1. Publish the Move package

Build and test once more, then publish from the directory that contains Move.toml:

export SUI_BUILD_ENV="testnet"
(
  set -e
  cd tap
  sui move build --build-env "$SUI_BUILD_ENV"
  nexus tap test --path ../move-tests-published --build-env "$SUI_BUILD_ENV"
  sui client publish . --build-env "$SUI_BUILD_ENV" --json > ../publish-package.json
)

The released published-bytecode test runs before sui client publish in the same fail-fast block. It exercises the selected public Nexus bytecode in a read-only local VM and does not publish or register anything. Keep its output with the package-owned Move tests; the explicit test packages and their plain-Move boundary are described in Build the TAP Move package. A green result does not replace the publication, Tool registration, DAG publication, skill binding, or later Testnet execution checks.

The publication transaction creates the immutable package and runs its init function, which shares one TutorialState. Save both IDs from objectChanges; the exact values are network-specific:

Require both values to be nonempty before continuing. Keep publish-package.json; it is the durable link between the package, state, and transaction.

2. Find the freshly published TutorialState and witness IDs

TutorialState is shared, so inspect it by ID rather than looking only at address-owned objects:

The decoded content includes the transfer_vertex_witness created by init. Its nested UID is the Tool requirement identity, not the shared TutorialState ID. A parent-object read is useful context, but the public CLI does not provide a generic package-specific proof of that nested UID.

The named operator-supplied/decode-tutorial-transfer-witness artifact must read the published TutorialState, prove the exact ${PKG}::tutorial_transfer::TransferVertexWitness type and its id: UID field, and emit the checked JSON fields above. Record the source/checksum with the deployment evidence. Stop if the artifact or exact type/UID proof is unavailable; never substitute STATE for WITNESS.

3. Register the on-chain transfer Tool

The SUI faucet funds owned Coin<SUI> objects, not the signer's SUI address balance. Select an owned gas coin from sui client gas with at least 500,000,000 MIST for the transaction budget below, then set NEXUS_GAS_COIN to its object ID. Recheck its remaining balance before each later Nexus transaction and select another funded coin if necessary. Registration, DAG publication, and Agent binding below explicitly use this coin; omitting --sui-gas-coin would require a separately funded address balance.

A few things worth knowing:

  • --package and --module must identify the published module that contains public fun execute. The CLI derives the input mode/schema from execute and the output schema from Output.

  • --tool-fqn must equal the FQN in the Move helper and dag.json. Nexus CLI FQNs use dotted domain.name@version syntax.

  • --tool-witness-id ties the Tool record to TransferVertexWitness; runtime execution satisfies that exact witness through UIDRequirements.

  • Owner and cashier capabilities are returned in the JSON and saved to local Tool configuration unless --no-save is used. Preserve their custody; they authorize later Tool administration and ToolCashier operations.

Confirm the live record before publishing the DAG:

This tutorial uses the standard on-chain mode: execute starts with UIDRequirements and OnchainToolResult and has no package-specific external caller check. That is why the guide uses disposable assets.

4. Publish the DAG, create the artifact, and bind the Agent

Now that the FQN resolves to a registered Tool and immutable schema, publish the DAG:

Create the skill artifact from the published DAG. The CLI fetches the DAG's actual entry ports and derives requirements.input_commitment; it does not trust the placeholder in the local scaffold config:

nexus tap bind creates a new Agent and registers its first skill in one transaction:

tap bind always creates a new Agent. If you already have an Agent, use nexus tap register-skill --agent-id <existing> --artifact artifact.json instead. Later DAG or requirement changes use a new artifact plus nexus tap update-skill; a compatible package-pointer migration alone does not require a new skill revision when the DAG and requirements stay unchanged.

5. Confirm in the registry

You should see one Agent entry and one skill entry with interface revision 1, a pinned DAG binding matching $DAG, UserFunded payment, Once scheduling, and an empty fixed-Tool list. nexus tap default-agent show is unaffected; that is the registry-managed default Agent, not the object created here.

What you have now

  • A published TAP Move package and shared TutorialState, recorded in publish-package.json.

  • A registered on-chain Tool with stable Tool/owner/ToolCashier identities and an immutable schema.

  • A published one-vertex DAG and reusable artifact.json derived from its entry inputs.

  • A new Agent with one skill pinned to that DAG.

The treasury inside TutorialState is still empty. The next page funds it, creates a Task, follows its Occurrence and Execution, and settles the result.

Next: Execute and verify the transfer.

Last updated