🔁Tool Communication
The nexus-toolkit runtime turns a NexusTool implementation into a plain HTTP server with GET /health, GET /meta, and POST /invoke endpoints. Every hop carrying signed requests must provide authenticated HTTPS; terminate TLS in the Toolkit or use an equivalently protected gateway, then point the runtime at NEXUS_TOOLKIT_CONFIG_PATH and feed it an allowlist of permitted leaders produced by nexus tool auth export-allowed-leaders. A plaintext gateway-to-Tool hop is unsafe.
Signed HTTP v3 authenticates the schema-ordered canonical input hash with the Leader key. The Tool response signature then binds the response domain, that Leader signature, the deterministic invocation nonce, and the canonical response commitment. HTTPS—not the signed message—protects the HTTP method, path, query, raw transport bytes, and unsigned headers. Nexus consumes three public endpoints:
GET /metaadvertises the FQN, schemas, timeout, and URL;POST /invokecarries the signed input and returns one output variant;GET /healthis the readiness check that validation and orchestration use before registration.
The runtime contract is intentionally small: initialize the tool implementation, bootstrap the server, keep the signing key and allowlist local, and let the CLI validate and register the endpoint. The toolkit reference documents the Rust API surface, while this guide explains the runtime behavior that operators need to run and secure a tool.
Prerequisites
A running off-chain Tool that implements the published HTTP contract; see Build an Off-Chain Tool.
The Tool FQN and endpoint URL.
A configured CLI identity and the authority required to register Tool communication keys.
Illustrative request and result flow
Start the Tool and confirm
GET /healthreturns success.Confirm
GET /metareturns the FQN, timeout, and input/output schemas that will be registered.Register or rotate the Tool signing key, then export the allowed-leader data for the Tool runtime.
Submit one
POST /invokerequest through the normal leader path. The result must select one declared output variant and match its schema.
The durable on-chain evidence is the Tool registration and its active key binding. The HTTP request and response bodies, nonces, hashes, and signatures form the transcript used when the vertex selects RegisteredKey; the transient request itself is not a durable object.
Verification
Use nexus tool validate offchain --url <URL> to check the health and metadata surface before registration. After registration, inspect the Tool by FQN and run one bounded workflow execution. Record the Tool FQN, key id, Task or Execution ID, and result variant so a failed response can be compared with the registered schema and active key configuration.
Common failures and recovery
Health or metadata fails: fix the endpoint before registration; do not register a URL whose observed schema differs from the intended Tool contract.
Signature verification rejects a response: check the active Leader and Tool keys, transcript nonces, body hashes, and proxy behavior. A correctly signed payload is authenticated, not independently proven semantically true.
Output schema mismatch: return a declared output variant or update the Tool contract through the appropriate registration/upgrade path; do not retry the same incompatible result.
Next
Continue with Verify an Off-Chain Tool Result to choose and inspect the per-vertex verifier mode.
Last updated

