From 112fe10ef4cc9351481f8167811ad7ffdfc6e0d2 Mon Sep 17 00:00:00 2001 From: kouks <3684840+kouks@users.noreply.github.com> Date: Mon, 20 Apr 2026 10:35:52 +0000 Subject: [PATCH 1/2] Update docs from nexus-sdk (commit: 4254473de94ed5482fb5705a082e948594d6369c) --- nexus-sdk/cli.md | 5 ++++- nexus-sdk/client.md | 11 ++++++++++- nexus-sdk/guides/dag-construction.md | 18 ++++++++++++------ nexus-sdk/guides/llm-openai-chat-prep-tool.md | 1 - nexus-sdk/guides/math-branching-dag-builder.md | 1 - nexus-sdk/guides/math-branching-dag-entry.md | 8 ++++++-- nexus-sdk/guides/math-branching-quickstart.md | 1 - nexus-sdk/guides/math-branching-with-chat.md | 8 ++++++-- nexus-sdk/guides/onchain-tool-development.md | 1 - nexus-sdk/guides/setup.md | 7 +++---- nexus-sdk/guides/tool-communication.md | 1 - nexus-sdk/guides/tool-firewall.md | 1 - nexus-sdk/index.md | 1 - nexus-sdk/tool-development.md | 1 - nexus-sdk/toolkit-rust.md | 18 ++++++++++++------ 15 files changed, 53 insertions(+), 30 deletions(-) diff --git a/nexus-sdk/cli.md b/nexus-sdk/cli.md index 232ec78..eee77c4 100644 --- a/nexus-sdk/cli.md +++ b/nexus-sdk/cli.md @@ -1,6 +1,6 @@ # Nexus CLI -> concerns [`nexus-cli` repo](https://github.com/Talus-Network/nexus-sdk/tree/main/cli) +> concerns [`nexus-cli` repo][nexus-cli-repo] The Nexus CLI is a set of tools that is used by almost all Actors in the Nexus ecosystem. @@ -494,3 +494,6 @@ This command requires that a wallet is connected to the CLI... Provides completion for some well-known shells. + + +[nexus-cli-repo]: https://github.com/Talus-Network/nexus-sdk/tree/main/cli diff --git a/nexus-sdk/client.md b/nexus-sdk/client.md index 689dca5..02c4763 100644 --- a/nexus-sdk/client.md +++ b/nexus-sdk/client.md @@ -97,6 +97,8 @@ println!("Gas budget added in tx: {:?}", result.tx_digest); **Returns:** +[`AddBudgetResult`]: includes the transaction digest. + --- ## ⚡ Workflow Actions @@ -122,6 +124,9 @@ println!("Published DAG ID: {:?}", publish_result.dag_object_id); **Returns:** +[`PublishResult`]: includes the transaction digest and DAG object ID. + +--- ### 2. Execute a Workflow @@ -157,8 +162,10 @@ println!("Execution object ID: {:?}", execute_result.execution_object_id); **Returns:** +[`ExecuteResult`]: includes the transaction digest and execution object ID. --- + ### 3. Inspect Workflow Execution ```rust @@ -193,9 +200,12 @@ println!("✅ Execution finished successfully!"); **Returns:** +[`InspectExecutionResult`]: includes an event stream and a poller handle. --- +## ⏱️ Scheduler Actions + The [`SchedulerActions`] API allows you to create and manage **on-chain scheduler tasks**. A scheduler task is split into: @@ -370,4 +380,3 @@ The `NexusError` enum categorizes issues from configuration errors to RPC and tr ## 🪶 Summary The [`NexusClient`] aims to make building, publishing, and executing Nexus workflows _simple, safe, and async-ready_. It abstracts away Sui transaction signing and gas management while providing a clean modular interface. - diff --git a/nexus-sdk/guides/dag-construction.md b/nexus-sdk/guides/dag-construction.md index 522c7ef..8640bf6 100644 --- a/nexus-sdk/guides/dag-construction.md +++ b/nexus-sdk/guides/dag-construction.md @@ -2,7 +2,7 @@ This guide explains how to construct DAG (Directed Acyclic Graph) JSON files for the Nexus platform. DAGs define the workflow that an Agent will execute. -For an explanation of the terms and rules used below, refer to [the Nexus workflow documentation](../../nexus-next/packages/workflow.md). +For an explanation of the terms and rules used below, refer to [the Nexus workflow documentation][nexus-next-workflow]. {% hint style="info"%} Note that for all DAG related terms in the configuration JSON file, snake casing is applied. @@ -89,7 +89,7 @@ Edges define the flow of data between vertices, connecting an output port of a s - **`do_while`** → Repeats execution by looping back as long as a condition is satisfied. - **`break`** → Exits a `do_while` loop when the condition is no longer met. -Read more about looping and flow controls in the [looping documentation](../../nexus-next/flow-controls/looping.md). +Read more about looping and flow controls in the [looping documentation][looping]. ## 4. Default Values @@ -108,8 +108,8 @@ Default values provide static inputs to vertices: **Important Constraints:** -- An _input port_ can receive data either from an _incoming edge_ or a _default value_, but **never both**. ([workflow rules](../../nexus-next/packages/workflow.md) Rule 4) -- Entry ports **cannot** have default values (by definition). Default values are only permitted for input ports that are _not_ entry ports. ([workflow rules](../../nexus-next/packages/workflow.md) Rule 11) +- An _input port_ can receive data either from an _incoming edge_ or a _default value_, but **never both**. ([workflow rules][nexus-next-workflow] Rule 4) +- Entry ports **cannot** have default values (by definition). Default values are only permitted for input ports that are _not_ entry ports. ([workflow rules][nexus-next-workflow] Rule 11) ## 5. Entry Groups (Optional) @@ -165,7 +165,7 @@ Outputs can be defined on vertices that have no outgoing edges. These can be tho ## 7. Validation Rules -The [Nexus CLI](../cli.md) (`nexus dag validate`) performs static analysis to enforce the critical rules defined in [workflow rules](../../nexus-next/packages/workflow.md). +The [Nexus CLI][nexus-cli] (`nexus dag validate`) performs static analysis to enforce the critical rules defined in [workflow rules][nexus-next-workflow]. ## 8. Best Practices @@ -229,5 +229,11 @@ For working examples, see the following files in the `cli/src/dag/_dags` directo - `ig_story_planner_valid.json`: Example of a complex workflow - `entry_groups_valid.json`: Example of using entry groups. -For examples of invalid DAGs and common mistakes to avoid (especially regarding Rule 5 - Race Conditions), see the diagrams in [workflow documentation](../../nexus-next/packages/workflow.md) and the `*_invalid.json` files in the [testing DAG directory](https://github.com/Talus-Network/nexus-sdk/tree/v0.8.4/sdk/src/dag/_dags). +For examples of invalid DAGs and common mistakes to avoid (especially regarding Rule 5 - Race Conditions), see the diagrams in [workflow documentation][nexus-next-workflow] and the `*_invalid.json` files in the [testing DAG directory][example-dags]. + + +[nexus-next-workflow]: ../../nexus-next/packages/workflow.md +[example-dags]: https://github.com/Talus-Network/nexus-sdk/tree/v1.0.0-testnet.1/sdk/src/dag/_dags +[nexus-cli]: ../cli.md +[looping]: ../../nexus-next/flow-controls/looping.md diff --git a/nexus-sdk/guides/llm-openai-chat-prep-tool.md b/nexus-sdk/guides/llm-openai-chat-prep-tool.md index e262240..52c9e03 100644 --- a/nexus-sdk/guides/llm-openai-chat-prep-tool.md +++ b/nexus-sdk/guides/llm-openai-chat-prep-tool.md @@ -379,4 +379,3 @@ Consider for what use cases you could use this tool to prepare it to add as an L ## Next Steps This tool provides a simple but essential bridge between mathematical operations and chat completion, enabling the creation of more sophisticated DAGs that combine numerical computation with natural language processing. Follow along with the developer guides to expand the [Math Branching Example DAG with LLM chat completion](math-branching-with-chat.md). - diff --git a/nexus-sdk/guides/math-branching-dag-builder.md b/nexus-sdk/guides/math-branching-dag-builder.md index 479a970..e493441 100644 --- a/nexus-sdk/guides/math-branching-dag-builder.md +++ b/nexus-sdk/guides/math-branching-dag-builder.md @@ -485,4 +485,3 @@ This example showcases how to combine simple tools and DAG structure definitions ## Up Next Want to extend this example? Follow the next part of the guide to see how we can add another entry point to the DAG and manage this through entry groups. - diff --git a/nexus-sdk/guides/math-branching-dag-entry.md b/nexus-sdk/guides/math-branching-dag-entry.md index 1536315..34a1bf5 100644 --- a/nexus-sdk/guides/math-branching-dag-entry.md +++ b/nexus-sdk/guides/math-branching-dag-entry.md @@ -1,6 +1,6 @@ # Extending Your DAG with Entry Groups -This guide builds on the [Build the Quickstart guide](./math-branching-dag-builder.md) by extending the example to support multiple entry points using entry groups. You'll take the original [`math_branching.json`](https://github.com/Talus-Network/nexus-sdk/blob/main/sdk/src/dag/_dags/math_branching.json) DAG and add an alternative entry path that allows users to directly provide two numbers for multiplication instead of adding a constant to the input. +This guide builds on the [Build the Quickstart guide][math-branching-dag-builder-guide] by extending the example to support multiple entry points using entry groups. You'll take the original [`math_branching.json`](https://github.com/Talus-Network/nexus-sdk/blob/main/sdk/src/dag/_dags/math_branching.json) DAG and add an alternative entry path that allows users to directly provide two numbers for multiplication instead of adding a constant to the input. {% hint style="info" %} Prerequisites Follow the [setup guide](setup.md) to get properly setup in case you haven't. @@ -602,5 +602,9 @@ In this guide, we extended our original branching math DAG to support multiple e Entry groups are a powerful feature of Nexus DAGs that enable more flexible and modular workflows while maintaining the safety guarantees of the DAG execution model. They allow a single DAG to support multiple different starting states and input combinations while preventing potential race conditions. -For more advanced usage of entry groups and other DAG features, refer to the [DAG Construction Guide](./dag-construction.md). +For more advanced usage of entry groups and other DAG features, refer to the [DAG Construction Guide][dag-construction]. + + +[dag-construction]: ./dag-construction.md +[math-branching-dag-builder-guide]: ./math-branching-dag-builder.md diff --git a/nexus-sdk/guides/math-branching-quickstart.md b/nexus-sdk/guides/math-branching-quickstart.md index 5a00707..3e17b06 100644 --- a/nexus-sdk/guides/math-branching-quickstart.md +++ b/nexus-sdk/guides/math-branching-quickstart.md @@ -149,4 +149,3 @@ When you execute the DAG via the `nexus dag execute` command, a successful outpu - Read the full [Agent Builder Guide](math-branching-dag-builder.md) to understand how this DAG is constructed - Study the [DAG Construction Guide](dag-construction.md) for more advanced DAG features - Try building your own DAG with different tools and logic flows - diff --git a/nexus-sdk/guides/math-branching-with-chat.md b/nexus-sdk/guides/math-branching-with-chat.md index f07ab6d..80166c6 100644 --- a/nexus-sdk/guides/math-branching-with-chat.md +++ b/nexus-sdk/guides/math-branching-with-chat.md @@ -1,6 +1,6 @@ # Extending the Math Branching DAG with Chat Completion -This guide builds on the [Math Branching DAG with Entry Groups](./math-branching-dag-entry.md) by adding a chat completion tool that explains the mathematical results. You'll learn how to: +This guide builds on the [Math Branching DAG with Entry Groups][math-branching-entry-guide] by adding a chat completion tool that explains the mathematical results. You'll learn how to: 1. Understand the need for a custom tool to bridge between math operations and chat completion 1. Add the chat completion tool to the DAG @@ -15,7 +15,7 @@ Follow the [setup guide](setup.md) to get properly setup in case you haven't. Before you can connect our math operations to the chat completion tool, you need to understand a key challenge: type safety. The [LLM chat completion tool](../../tools/llm-openai-chat-completion/README.md)expects a `Message` struct as input, but the [math tool](../../tools/math/README.md) outputs numbers. You can't directly connect these without proper type conversion. -This is where you need a custom tool to bridge this gap. You'll use the `xyz.taluslabs.llm.openai.chat-prep@1` tool that you developed in the [Build the Missing Tool guide](./llm-openai-chat-prep-tool.md). This tool converts numbers into the proper message format that the chat completion tool expects. +This is where you need a custom tool to bridge this gap. You'll use the `xyz.taluslabs.llm.openai.chat-prep@1` tool that you developed in the [Build the Missing Tool guide][llm-openai-chat-prep-tool]. This tool converts numbers into the proper message format that the chat completion tool expects. ## Step 1: Adding the Required Tools @@ -662,3 +662,7 @@ This extended DAG demonstrates how to combine mathematical computation with natu This extended DAG demonstrates how to combine mathematical computation with natural language processing, creating a more interactive and engaging experience for users. + + +[math-branching-entry-guide]: ./math-branching-dag-entry.md +[llm-openai-chat-prep-tool]: ./llm-openai-chat-prep-tool.md diff --git a/nexus-sdk/guides/onchain-tool-development.md b/nexus-sdk/guides/onchain-tool-development.md index 1578c3b..8e499db 100644 --- a/nexus-sdk/guides/onchain-tool-development.md +++ b/nexus-sdk/guides/onchain-tool-development.md @@ -379,4 +379,3 @@ This workflow only executes the onchain tool twice if the output variant is Succ - **Examples**: Study the [onchain tool example modules](../../nexus-next/sui/examples/) and [corresponding json dag workflows](../../sdk/src/dag/_dags/) Remember that onchain tools are powerful building blocks in the Nexus ecosystem. Well-designed tools can be composed with others to create sophisticated autonomous agents and workflows. - diff --git a/nexus-sdk/guides/setup.md b/nexus-sdk/guides/setup.md index 8b5a542..5a2ece5 100644 --- a/nexus-sdk/guides/setup.md +++ b/nexus-sdk/guides/setup.md @@ -38,7 +38,7 @@ To install directly from the source using `cargo`, run: ```bash cargo install nexus-cli \ --git https://github.com/talus-network/nexus-sdk \ - --tag v0.8.4 \ + --tag v1.0.0-testnet.1 \ --locked ``` @@ -54,7 +54,7 @@ nexus --version {% tab title="Testnet" %} ```bash -wget -O ~/.nexus/objects.testnet.toml https://storage.googleapis.com/production-talus-sui-objects/v0.8.4/objects.testnet.toml +wget -O ~/.nexus/objects.testnet.toml https://storage.googleapis.com/production-talus-sui-objects/v1.0.0-testnet.1/objects.testnet.toml ``` {% endtab %} @@ -62,7 +62,7 @@ wget -O ~/.nexus/objects.testnet.toml https://storage.googleapis.com/production- {% tab title="Mainnet" %} ```bash -wget -O ~/.nexus/objects.mainnet.toml https://storage.googleapis.com/production-talus-sui-objects/v0.8.4/objects.mainnet.toml +wget -O ~/.nexus/objects.mainnet.toml https://storage.googleapis.com/production-talus-sui-objects/v1.0.0/objects.mainnet.toml ``` {% endtab %} @@ -185,4 +185,3 @@ Note that this coin can only be used to pay for Nexus and tool invocation fees o --- After completing these steps, you are ready to build and execute workflows using the Nexus SDK. To build your first workflow, check the [Dev Quickstart guide](math-branching-quickstart.md). - diff --git a/nexus-sdk/guides/tool-communication.md b/nexus-sdk/guides/tool-communication.md index eb61bc8..f11fe71 100644 --- a/nexus-sdk/guides/tool-communication.md +++ b/nexus-sdk/guides/tool-communication.md @@ -360,4 +360,3 @@ Common causes: - Certificate is self-signed or missing intermediate chain. - Certificate hostname does not match the Tool URL. - Leader node environment does not include the required root CA (custom CA deployments). - diff --git a/nexus-sdk/guides/tool-firewall.md b/nexus-sdk/guides/tool-firewall.md index c80b5f6..a4c0b53 100644 --- a/nexus-sdk/guides/tool-firewall.md +++ b/nexus-sdk/guides/tool-firewall.md @@ -83,4 +83,3 @@ You should see entries indicating that connections from the specified IP address --- By following this guide, your Tool will be configured to accept connections only from the specified Leader nodes, enhancing security as defense-in-depth. - diff --git a/nexus-sdk/index.md b/nexus-sdk/index.md index f21f28b..5ec7e1e 100644 --- a/nexus-sdk/index.md +++ b/nexus-sdk/index.md @@ -42,4 +42,3 @@ Docs: - [Tool Development Guidelines](tool-development.md) - [Nexus Toolkit Rust](toolkit-rust.md) - [Tool Communication (HTTPS + Signed HTTP)](guides/tool-communication.md) - diff --git a/nexus-sdk/tool-development.md b/nexus-sdk/tool-development.md index b62b261..1f8da22 100644 --- a/nexus-sdk/tool-development.md +++ b/nexus-sdk/tool-development.md @@ -91,4 +91,3 @@ Tool developers should design with these constraints in mind: For a detailed guide (TLS termination options, key registration, runtime config, and troubleshooting), see: - [Tool Communication (HTTPS + Signed HTTP)](guides/tool-communication.md) - diff --git a/nexus-sdk/toolkit-rust.md b/nexus-sdk/toolkit-rust.md index d9854b4..405baff 100644 --- a/nexus-sdk/toolkit-rust.md +++ b/nexus-sdk/toolkit-rust.md @@ -1,6 +1,6 @@ # Nexus Toolkit for Rust -> concerns [`nexus-toolkit-rust` repo](https://github.com/Talus-Network/nexus-sdk/tree/main/toolkit-rust) +> concerns [`nexus-toolkit-rust` repo][nexus-toolkit-rust-repo] This library exports useful functionality to streamline the development of Nexus Tools in Rust. It is mainly used by **Tool developers** to bootstrap their efforts to extend the Nexus ecosystem. @@ -8,14 +8,14 @@ This documentation will go over the main features of the library and how to use ## Installation -Using the [CLI](./cli.md) run the `$ nexus tool new --help` command to see the available options. This command creates a fresh Rust project with the necessary dependencies to get started. +Using the [CLI][nexus-cli-docs] run the `$ nexus tool new --help` command to see the available options. This command creates a fresh Rust project with the necessary dependencies to get started. Alternatively, you can add the following to your `Cargo.toml` file: ```toml [dependencies.nexus-toolkit] git = "https://github.com/Talus-Network/nexus-sdk" -tag = "v0.8.4" +tag = "v1.0.0-testnet.1" package = "nexus-toolkit" ``` @@ -83,7 +83,7 @@ This associated type defines the output that the Tool produces. This type must d The Tool's output schema is then derived from this type via the `schemars::schema_for!` macro. -To comply with [Nexus Workflow output variants](../nexus-next/packages/workflow.md), the output schema **must include a top-level `oneOf`**. This is also enforced by the Tool's runtime and achievable in Rust simply by using an `enum`. +To comply with [Nexus Workflow output variants][nexus-next-workflow-docs], the output schema **must include a top-level `oneOf`**. This is also enforced by the Tool's runtime and achievable in Rust simply by using an `enum`. ```rs use nexus_toolkit::*; @@ -106,7 +106,7 @@ impl NexusTool for HttpStatus { #### `NexusTool::fqn` -Defines the Tool's fully qualified name. This is used to uniquely identify the Tool in the Nexus ecosystem. Read more about FQNs in the [Nexus Tool documentation](../nexus-next/tool.md). +Defines the Tool's fully qualified name. This is used to uniquely identify the Tool in the Nexus ecosystem. Read more about FQNs in the [Nexus Tool documentation][nexus-next-tool-docs]. ```rs use nexus_toolkit::*; @@ -204,7 +204,7 @@ If signed HTTP is disabled, `authorize` is not invoked. ### `nexus_toolkit::bootstrap!` The `bootstrap!` macro hides away the boilerplate code needed to create the -underlying HTTP server that adheres to the [Nexus Tool interface](../nexus-next/tool.md). +underlying HTTP server that adheres to the [Nexus Tool interface][nexus-next-tool-docs]. It has a flexible interface that accepts an `Into` value and a struct that `impl NexusTool`. @@ -280,3 +280,9 @@ For a full end-to-end setup guide (TLS termination options + key registration + - [Tool Communication (HTTPS + Signed HTTP)](guides/tool-communication.md) + + +[nexus-toolkit-rust-repo]: https://github.com/Talus-Network/nexus-sdk/tree/main/toolkit-rust +[nexus-next-tool-docs]: ../nexus-next/tool.md +[nexus-next-workflow-docs]: ../nexus-next/packages/workflow.md +[nexus-cli-docs]: ./cli.md From aabda66f6a60872d10806b40878f85d58ee0bea5 Mon Sep 17 00:00:00 2001 From: devops-talus <184664591+devops-talus@users.noreply.github.com> Date: Mon, 20 Apr 2026 10:36:07 +0000 Subject: [PATCH 2/2] chore(docs): format markdown links --- nexus-sdk/cli.md | 5 +---- nexus-sdk/client.md | 11 +---------- nexus-sdk/guides/dag-construction.md | 18 ++++++------------ nexus-sdk/guides/llm-openai-chat-prep-tool.md | 1 + nexus-sdk/guides/math-branching-dag-builder.md | 1 + nexus-sdk/guides/math-branching-dag-entry.md | 8 ++------ nexus-sdk/guides/math-branching-quickstart.md | 1 + nexus-sdk/guides/math-branching-with-chat.md | 8 ++------ nexus-sdk/guides/onchain-tool-development.md | 1 + nexus-sdk/guides/setup.md | 1 + nexus-sdk/guides/tool-communication.md | 1 + nexus-sdk/guides/tool-firewall.md | 1 + nexus-sdk/index.md | 1 + nexus-sdk/tool-development.md | 1 + nexus-sdk/toolkit-rust.md | 16 +++++----------- 15 files changed, 26 insertions(+), 49 deletions(-) diff --git a/nexus-sdk/cli.md b/nexus-sdk/cli.md index eee77c4..232ec78 100644 --- a/nexus-sdk/cli.md +++ b/nexus-sdk/cli.md @@ -1,6 +1,6 @@ # Nexus CLI -> concerns [`nexus-cli` repo][nexus-cli-repo] +> concerns [`nexus-cli` repo](https://github.com/Talus-Network/nexus-sdk/tree/main/cli) The Nexus CLI is a set of tools that is used by almost all Actors in the Nexus ecosystem. @@ -494,6 +494,3 @@ This command requires that a wallet is connected to the CLI... Provides completion for some well-known shells. - - -[nexus-cli-repo]: https://github.com/Talus-Network/nexus-sdk/tree/main/cli diff --git a/nexus-sdk/client.md b/nexus-sdk/client.md index 02c4763..689dca5 100644 --- a/nexus-sdk/client.md +++ b/nexus-sdk/client.md @@ -97,8 +97,6 @@ println!("Gas budget added in tx: {:?}", result.tx_digest); **Returns:** -[`AddBudgetResult`]: includes the transaction digest. - --- ## ⚡ Workflow Actions @@ -124,9 +122,6 @@ println!("Published DAG ID: {:?}", publish_result.dag_object_id); **Returns:** -[`PublishResult`]: includes the transaction digest and DAG object ID. - ---- ### 2. Execute a Workflow @@ -162,10 +157,8 @@ println!("Execution object ID: {:?}", execute_result.execution_object_id); **Returns:** -[`ExecuteResult`]: includes the transaction digest and execution object ID. --- - ### 3. Inspect Workflow Execution ```rust @@ -200,12 +193,9 @@ println!("✅ Execution finished successfully!"); **Returns:** -[`InspectExecutionResult`]: includes an event stream and a poller handle. --- -## ⏱️ Scheduler Actions - The [`SchedulerActions`] API allows you to create and manage **on-chain scheduler tasks**. A scheduler task is split into: @@ -380,3 +370,4 @@ The `NexusError` enum categorizes issues from configuration errors to RPC and tr ## 🪶 Summary The [`NexusClient`] aims to make building, publishing, and executing Nexus workflows _simple, safe, and async-ready_. It abstracts away Sui transaction signing and gas management while providing a clean modular interface. + diff --git a/nexus-sdk/guides/dag-construction.md b/nexus-sdk/guides/dag-construction.md index 8640bf6..10ff3b6 100644 --- a/nexus-sdk/guides/dag-construction.md +++ b/nexus-sdk/guides/dag-construction.md @@ -2,7 +2,7 @@ This guide explains how to construct DAG (Directed Acyclic Graph) JSON files for the Nexus platform. DAGs define the workflow that an Agent will execute. -For an explanation of the terms and rules used below, refer to [the Nexus workflow documentation][nexus-next-workflow]. +For an explanation of the terms and rules used below, refer to [the Nexus workflow documentation](../../nexus-next/packages/workflow.md). {% hint style="info"%} Note that for all DAG related terms in the configuration JSON file, snake casing is applied. @@ -89,7 +89,7 @@ Edges define the flow of data between vertices, connecting an output port of a s - **`do_while`** → Repeats execution by looping back as long as a condition is satisfied. - **`break`** → Exits a `do_while` loop when the condition is no longer met. -Read more about looping and flow controls in the [looping documentation][looping]. +Read more about looping and flow controls in the [looping documentation](../../nexus-next/flow-controls/looping.md). ## 4. Default Values @@ -108,8 +108,8 @@ Default values provide static inputs to vertices: **Important Constraints:** -- An _input port_ can receive data either from an _incoming edge_ or a _default value_, but **never both**. ([workflow rules][nexus-next-workflow] Rule 4) -- Entry ports **cannot** have default values (by definition). Default values are only permitted for input ports that are _not_ entry ports. ([workflow rules][nexus-next-workflow] Rule 11) +- An _input port_ can receive data either from an _incoming edge_ or a _default value_, but **never both**. ([workflow rules](../../nexus-next/packages/workflow.md) Rule 4) +- Entry ports **cannot** have default values (by definition). Default values are only permitted for input ports that are _not_ entry ports. ([workflow rules](../../nexus-next/packages/workflow.md) Rule 11) ## 5. Entry Groups (Optional) @@ -165,7 +165,7 @@ Outputs can be defined on vertices that have no outgoing edges. These can be tho ## 7. Validation Rules -The [Nexus CLI][nexus-cli] (`nexus dag validate`) performs static analysis to enforce the critical rules defined in [workflow rules][nexus-next-workflow]. +The [Nexus CLI](../cli.md) (`nexus dag validate`) performs static analysis to enforce the critical rules defined in [workflow rules](../../nexus-next/packages/workflow.md). ## 8. Best Practices @@ -229,11 +229,5 @@ For working examples, see the following files in the `cli/src/dag/_dags` directo - `ig_story_planner_valid.json`: Example of a complex workflow - `entry_groups_valid.json`: Example of using entry groups. -For examples of invalid DAGs and common mistakes to avoid (especially regarding Rule 5 - Race Conditions), see the diagrams in [workflow documentation][nexus-next-workflow] and the `*_invalid.json` files in the [testing DAG directory][example-dags]. +For examples of invalid DAGs and common mistakes to avoid (especially regarding Rule 5 - Race Conditions), see the diagrams in [workflow documentation](../../nexus-next/packages/workflow.md) and the `*_invalid.json` files in the [testing DAG directory](https://github.com/Talus-Network/nexus-sdk/tree/v1.0.0-testnet.1/sdk/src/dag/_dags). - - -[nexus-next-workflow]: ../../nexus-next/packages/workflow.md -[example-dags]: https://github.com/Talus-Network/nexus-sdk/tree/v1.0.0-testnet.1/sdk/src/dag/_dags -[nexus-cli]: ../cli.md -[looping]: ../../nexus-next/flow-controls/looping.md diff --git a/nexus-sdk/guides/llm-openai-chat-prep-tool.md b/nexus-sdk/guides/llm-openai-chat-prep-tool.md index 52c9e03..e262240 100644 --- a/nexus-sdk/guides/llm-openai-chat-prep-tool.md +++ b/nexus-sdk/guides/llm-openai-chat-prep-tool.md @@ -379,3 +379,4 @@ Consider for what use cases you could use this tool to prepare it to add as an L ## Next Steps This tool provides a simple but essential bridge between mathematical operations and chat completion, enabling the creation of more sophisticated DAGs that combine numerical computation with natural language processing. Follow along with the developer guides to expand the [Math Branching Example DAG with LLM chat completion](math-branching-with-chat.md). + diff --git a/nexus-sdk/guides/math-branching-dag-builder.md b/nexus-sdk/guides/math-branching-dag-builder.md index e493441..479a970 100644 --- a/nexus-sdk/guides/math-branching-dag-builder.md +++ b/nexus-sdk/guides/math-branching-dag-builder.md @@ -485,3 +485,4 @@ This example showcases how to combine simple tools and DAG structure definitions ## Up Next Want to extend this example? Follow the next part of the guide to see how we can add another entry point to the DAG and manage this through entry groups. + diff --git a/nexus-sdk/guides/math-branching-dag-entry.md b/nexus-sdk/guides/math-branching-dag-entry.md index 34a1bf5..1536315 100644 --- a/nexus-sdk/guides/math-branching-dag-entry.md +++ b/nexus-sdk/guides/math-branching-dag-entry.md @@ -1,6 +1,6 @@ # Extending Your DAG with Entry Groups -This guide builds on the [Build the Quickstart guide][math-branching-dag-builder-guide] by extending the example to support multiple entry points using entry groups. You'll take the original [`math_branching.json`](https://github.com/Talus-Network/nexus-sdk/blob/main/sdk/src/dag/_dags/math_branching.json) DAG and add an alternative entry path that allows users to directly provide two numbers for multiplication instead of adding a constant to the input. +This guide builds on the [Build the Quickstart guide](./math-branching-dag-builder.md) by extending the example to support multiple entry points using entry groups. You'll take the original [`math_branching.json`](https://github.com/Talus-Network/nexus-sdk/blob/main/sdk/src/dag/_dags/math_branching.json) DAG and add an alternative entry path that allows users to directly provide two numbers for multiplication instead of adding a constant to the input. {% hint style="info" %} Prerequisites Follow the [setup guide](setup.md) to get properly setup in case you haven't. @@ -602,9 +602,5 @@ In this guide, we extended our original branching math DAG to support multiple e Entry groups are a powerful feature of Nexus DAGs that enable more flexible and modular workflows while maintaining the safety guarantees of the DAG execution model. They allow a single DAG to support multiple different starting states and input combinations while preventing potential race conditions. -For more advanced usage of entry groups and other DAG features, refer to the [DAG Construction Guide][dag-construction]. +For more advanced usage of entry groups and other DAG features, refer to the [DAG Construction Guide](./dag-construction.md). - - -[dag-construction]: ./dag-construction.md -[math-branching-dag-builder-guide]: ./math-branching-dag-builder.md diff --git a/nexus-sdk/guides/math-branching-quickstart.md b/nexus-sdk/guides/math-branching-quickstart.md index 3e17b06..5a00707 100644 --- a/nexus-sdk/guides/math-branching-quickstart.md +++ b/nexus-sdk/guides/math-branching-quickstart.md @@ -149,3 +149,4 @@ When you execute the DAG via the `nexus dag execute` command, a successful outpu - Read the full [Agent Builder Guide](math-branching-dag-builder.md) to understand how this DAG is constructed - Study the [DAG Construction Guide](dag-construction.md) for more advanced DAG features - Try building your own DAG with different tools and logic flows + diff --git a/nexus-sdk/guides/math-branching-with-chat.md b/nexus-sdk/guides/math-branching-with-chat.md index 80166c6..f07ab6d 100644 --- a/nexus-sdk/guides/math-branching-with-chat.md +++ b/nexus-sdk/guides/math-branching-with-chat.md @@ -1,6 +1,6 @@ # Extending the Math Branching DAG with Chat Completion -This guide builds on the [Math Branching DAG with Entry Groups][math-branching-entry-guide] by adding a chat completion tool that explains the mathematical results. You'll learn how to: +This guide builds on the [Math Branching DAG with Entry Groups](./math-branching-dag-entry.md) by adding a chat completion tool that explains the mathematical results. You'll learn how to: 1. Understand the need for a custom tool to bridge between math operations and chat completion 1. Add the chat completion tool to the DAG @@ -15,7 +15,7 @@ Follow the [setup guide](setup.md) to get properly setup in case you haven't. Before you can connect our math operations to the chat completion tool, you need to understand a key challenge: type safety. The [LLM chat completion tool](../../tools/llm-openai-chat-completion/README.md)expects a `Message` struct as input, but the [math tool](../../tools/math/README.md) outputs numbers. You can't directly connect these without proper type conversion. -This is where you need a custom tool to bridge this gap. You'll use the `xyz.taluslabs.llm.openai.chat-prep@1` tool that you developed in the [Build the Missing Tool guide][llm-openai-chat-prep-tool]. This tool converts numbers into the proper message format that the chat completion tool expects. +This is where you need a custom tool to bridge this gap. You'll use the `xyz.taluslabs.llm.openai.chat-prep@1` tool that you developed in the [Build the Missing Tool guide](./llm-openai-chat-prep-tool.md). This tool converts numbers into the proper message format that the chat completion tool expects. ## Step 1: Adding the Required Tools @@ -662,7 +662,3 @@ This extended DAG demonstrates how to combine mathematical computation with natu This extended DAG demonstrates how to combine mathematical computation with natural language processing, creating a more interactive and engaging experience for users. - - -[math-branching-entry-guide]: ./math-branching-dag-entry.md -[llm-openai-chat-prep-tool]: ./llm-openai-chat-prep-tool.md diff --git a/nexus-sdk/guides/onchain-tool-development.md b/nexus-sdk/guides/onchain-tool-development.md index 8e499db..1578c3b 100644 --- a/nexus-sdk/guides/onchain-tool-development.md +++ b/nexus-sdk/guides/onchain-tool-development.md @@ -379,3 +379,4 @@ This workflow only executes the onchain tool twice if the output variant is Succ - **Examples**: Study the [onchain tool example modules](../../nexus-next/sui/examples/) and [corresponding json dag workflows](../../sdk/src/dag/_dags/) Remember that onchain tools are powerful building blocks in the Nexus ecosystem. Well-designed tools can be composed with others to create sophisticated autonomous agents and workflows. + diff --git a/nexus-sdk/guides/setup.md b/nexus-sdk/guides/setup.md index 5a2ece5..eec71be 100644 --- a/nexus-sdk/guides/setup.md +++ b/nexus-sdk/guides/setup.md @@ -185,3 +185,4 @@ Note that this coin can only be used to pay for Nexus and tool invocation fees o --- After completing these steps, you are ready to build and execute workflows using the Nexus SDK. To build your first workflow, check the [Dev Quickstart guide](math-branching-quickstart.md). + diff --git a/nexus-sdk/guides/tool-communication.md b/nexus-sdk/guides/tool-communication.md index f11fe71..eb61bc8 100644 --- a/nexus-sdk/guides/tool-communication.md +++ b/nexus-sdk/guides/tool-communication.md @@ -360,3 +360,4 @@ Common causes: - Certificate is self-signed or missing intermediate chain. - Certificate hostname does not match the Tool URL. - Leader node environment does not include the required root CA (custom CA deployments). + diff --git a/nexus-sdk/guides/tool-firewall.md b/nexus-sdk/guides/tool-firewall.md index a4c0b53..c80b5f6 100644 --- a/nexus-sdk/guides/tool-firewall.md +++ b/nexus-sdk/guides/tool-firewall.md @@ -83,3 +83,4 @@ You should see entries indicating that connections from the specified IP address --- By following this guide, your Tool will be configured to accept connections only from the specified Leader nodes, enhancing security as defense-in-depth. + diff --git a/nexus-sdk/index.md b/nexus-sdk/index.md index 5ec7e1e..f21f28b 100644 --- a/nexus-sdk/index.md +++ b/nexus-sdk/index.md @@ -42,3 +42,4 @@ Docs: - [Tool Development Guidelines](tool-development.md) - [Nexus Toolkit Rust](toolkit-rust.md) - [Tool Communication (HTTPS + Signed HTTP)](guides/tool-communication.md) + diff --git a/nexus-sdk/tool-development.md b/nexus-sdk/tool-development.md index 1f8da22..b62b261 100644 --- a/nexus-sdk/tool-development.md +++ b/nexus-sdk/tool-development.md @@ -91,3 +91,4 @@ Tool developers should design with these constraints in mind: For a detailed guide (TLS termination options, key registration, runtime config, and troubleshooting), see: - [Tool Communication (HTTPS + Signed HTTP)](guides/tool-communication.md) + diff --git a/nexus-sdk/toolkit-rust.md b/nexus-sdk/toolkit-rust.md index 405baff..da08fa4 100644 --- a/nexus-sdk/toolkit-rust.md +++ b/nexus-sdk/toolkit-rust.md @@ -1,6 +1,6 @@ # Nexus Toolkit for Rust -> concerns [`nexus-toolkit-rust` repo][nexus-toolkit-rust-repo] +> concerns [`nexus-toolkit-rust` repo](https://github.com/Talus-Network/nexus-sdk/tree/main/toolkit-rust) This library exports useful functionality to streamline the development of Nexus Tools in Rust. It is mainly used by **Tool developers** to bootstrap their efforts to extend the Nexus ecosystem. @@ -8,7 +8,7 @@ This documentation will go over the main features of the library and how to use ## Installation -Using the [CLI][nexus-cli-docs] run the `$ nexus tool new --help` command to see the available options. This command creates a fresh Rust project with the necessary dependencies to get started. +Using the [CLI](./cli.md) run the `$ nexus tool new --help` command to see the available options. This command creates a fresh Rust project with the necessary dependencies to get started. Alternatively, you can add the following to your `Cargo.toml` file: @@ -83,7 +83,7 @@ This associated type defines the output that the Tool produces. This type must d The Tool's output schema is then derived from this type via the `schemars::schema_for!` macro. -To comply with [Nexus Workflow output variants][nexus-next-workflow-docs], the output schema **must include a top-level `oneOf`**. This is also enforced by the Tool's runtime and achievable in Rust simply by using an `enum`. +To comply with [Nexus Workflow output variants](../nexus-next/packages/workflow.md), the output schema **must include a top-level `oneOf`**. This is also enforced by the Tool's runtime and achievable in Rust simply by using an `enum`. ```rs use nexus_toolkit::*; @@ -106,7 +106,7 @@ impl NexusTool for HttpStatus { #### `NexusTool::fqn` -Defines the Tool's fully qualified name. This is used to uniquely identify the Tool in the Nexus ecosystem. Read more about FQNs in the [Nexus Tool documentation][nexus-next-tool-docs]. +Defines the Tool's fully qualified name. This is used to uniquely identify the Tool in the Nexus ecosystem. Read more about FQNs in the [Nexus Tool documentation](../nexus-next/tool.md). ```rs use nexus_toolkit::*; @@ -204,7 +204,7 @@ If signed HTTP is disabled, `authorize` is not invoked. ### `nexus_toolkit::bootstrap!` The `bootstrap!` macro hides away the boilerplate code needed to create the -underlying HTTP server that adheres to the [Nexus Tool interface][nexus-next-tool-docs]. +underlying HTTP server that adheres to the [Nexus Tool interface](../nexus-next/tool.md). It has a flexible interface that accepts an `Into` value and a struct that `impl NexusTool`. @@ -280,9 +280,3 @@ For a full end-to-end setup guide (TLS termination options + key registration + - [Tool Communication (HTTPS + Signed HTTP)](guides/tool-communication.md) - - -[nexus-toolkit-rust-repo]: https://github.com/Talus-Network/nexus-sdk/tree/main/toolkit-rust -[nexus-next-tool-docs]: ../nexus-next/tool.md -[nexus-next-workflow-docs]: ../nexus-next/packages/workflow.md -[nexus-cli-docs]: ./cli.md