From e0f405495c3cac8e1890ae62766a99f6e51f8f04 Mon Sep 17 00:00:00 2001 From: tuky191 <25343132+tuky191@users.noreply.github.com> Date: Tue, 12 Aug 2025 15:59:49 +0000 Subject: [PATCH 1/2] Update docs from nexus-sdk (commit: 153859175e2aa3978cf20c84ea1fa3921193800c) --- nexus-sdk/cli.md | 5 +- nexus-sdk/guides/dag-construction.md | 15 +++-- nexus-sdk/guides/llm-openai-chat-prep-tool.md | 1 - .../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/setup.md | 59 ++++++++++++++----- nexus-sdk/guides/tool-firewall.md | 1 - nexus-sdk/index.md | 1 - nexus-sdk/tool-development.md | 1 - nexus-sdk/toolkit-rust.md | 16 +++-- 12 files changed, 81 insertions(+), 36 deletions(-) diff --git a/nexus-sdk/cli.md b/nexus-sdk/cli.md index 6157d81..d4ca896 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. @@ -306,3 +306,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/guides/dag-construction.md b/nexus-sdk/guides/dag-construction.md index 5598269..d8cb2b0 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. @@ -100,8 +100,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) @@ -158,7 +158,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 @@ -230,5 +230,10 @@ 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.1.0/cli/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/v0.1.0/cli/src/dag/_dags +[nexus-cli]: ../cli.md diff --git a/nexus-sdk/guides/llm-openai-chat-prep-tool.md b/nexus-sdk/guides/llm-openai-chat-prep-tool.md index 75e5863..909bc42 100644 --- a/nexus-sdk/guides/llm-openai-chat-prep-tool.md +++ b/nexus-sdk/guides/llm-openai-chat-prep-tool.md @@ -381,4 +381,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 eb4e346..34e89c2 100644 --- a/nexus-sdk/guides/math-branching-dag-builder.md +++ b/nexus-sdk/guides/math-branching-dag-builder.md @@ -487,4 +487,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 b6f4154..e7e2a8a 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. @@ -608,5 +608,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 a5ca1c3..23b0b3b 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 @@ -668,3 +668,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/setup.md b/nexus-sdk/guides/setup.md index c4100ae..f0b612c 100644 --- a/nexus-sdk/guides/setup.md +++ b/nexus-sdk/guides/setup.md @@ -48,31 +48,35 @@ cargo install nexus-cli \ nexus --version ``` +## Download the Nexus objects + +```bash +wget https://storage.googleapis.com/production-talus-sui-objects/v0.2.0/objects.devnet.toml +``` + ## Configure the Talus devnet Configure your Nexus CLI to connect to the Talus `devnet` by running: ```bash -nexus conf --sui.net devnet \ - --sui.rpc-url https://rpc.ssfn.devnet.production.taluslabs.dev +nexus conf set --sui.net devnet \ + --sui.rpc-url https://rpc.ssfn.devnet.production.taluslabs.dev \ + --nexus.objects objects.devnet.toml ``` -### Upload some gas budget to Nexus +### Configure the Sui client -In order to pay for the network transaction fees and the tool invocations, you need to upload some gas budget to Nexus. You can do this by running the following command: +After installing the Sui binaries, configure and activate your Talus `devnet` environment: + +{% hint style="info" %} +Assuming you have no prior sui configuration ```bash -nexus gas add-budget --coin +sui client --yes ``` -{% hint style="info" %} -Note that this coin can only be used to pay for Nexus and tool invocation fees only if the DAG is executed from the **same address**. {% endhint %} -### Configure the Sui client - -After installing the Sui binaries, configure and activate your Talus `devnet` environment: - ```bash sui client new-env --alias devnet --rpc https://rpc.ssfn.devnet.production.taluslabs.dev sui client switch --env devnet @@ -84,13 +88,14 @@ Create a new wallet with the following command: ```bash sui client new-address ed25519 tally +sui client switch --address tally ``` {% hint style="danger" %} This command will output your wallet details, including your address and recovery phrase. Ensure you store this information securely. {% endhint %} -To request funds from the faucet, run: +To request funds from the faucet, run the following command twice to get 2 gas coins: ```bash # Pick any alias for your address, here we pick the Talus mascot name tally. @@ -98,19 +103,44 @@ sui client faucet --address tally \ --url https://faucet.devnet.production.taluslabs.dev/gas ``` +```bash +sui client faucet --address tally \ + --url https://faucet.devnet.production.taluslabs.dev/gas +``` + To check the balance, run: ```bash sui client balance tally ``` -## (Optional) Configure Encryption for Nexus workflows +### Upload some gas budget to Nexus + +In order to pay for the network transaction fees and the tool invocations, you need to upload some gas budget to Nexus. You can do this by running the following command: + +```bash +GAS_INFO=$(sui client gas --json) + +echo $GAS_INFO + +nexus gas add-budget \ + --coin $(echo $GAS_INFO | jq -r '.[0].gasCoinId') \ + --sui-gas-coin $(echo $GAS_INFO | jq -r '.[1].gasCoinId') +``` + +{% hint style="info" %} +Note that this coin can only be used to pay for Nexus and tool invocation fees only if the DAG is executed from the **same address**. +{% endhint %} + +## Configure Encryption for Nexus workflows To ensure end-to-end encryption of data flowing through workflows, Nexus employs a customized implementation of the [Signal Protocol](https://signal.org/docs/). To establish a secure communication channel, you must claim a pre-key from the on-chain Nexus module `pre_key_vault`, perform an X3DH (Extended Triple Diffie-Hellman) key exchange, and derive a session key used to send an initial encrypted message. The Nexus CLI abstracts away these cryptographic operations. You can initialize this process by simply running: ```bash +nexus crypto init-key --force +nexus crypto generate-identity-key nexus crypto auth ``` @@ -120,7 +150,7 @@ This command generates two programmable transactions: - The second, after performing the X3DH handshake, sends the initial message to finalize the secure channel setup. {% hint style="info" %} -Keep in mind that the `claim_pre_key` operation is subject to rate limiting. Additionally, it requires a small gas budget to be deposited into Nexus. You can do this using the `nexus gas add-budget` command. +Keep in mind that the `claim_pre_key` operation is subject to rate limiting. Additionally, it requires a small gas budget to be deposited into Nexus. See `nexus gas add-budget` command. {% endhint %} ## (Optional) Access Devnet Sui Explorer @@ -130,4 +160,3 @@ Open the [Talus Sui Explorer](https://explorer.devnet.taluslabs.dev/). --- 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-firewall.md b/nexus-sdk/guides/tool-firewall.md index 8b2f782..8ecca40 100644 --- a/nexus-sdk/guides/tool-firewall.md +++ b/nexus-sdk/guides/tool-firewall.md @@ -73,4 +73,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 the security of your deployment. - diff --git a/nexus-sdk/index.md b/nexus-sdk/index.md index af13085..f948eac 100644 --- a/nexus-sdk/index.md +++ b/nexus-sdk/index.md @@ -40,4 +40,3 @@ Docs: - [Tool Development Guidelines](tool-development.md) - [Nexus Toolkit Rust](toolkit-rust.md) - diff --git a/nexus-sdk/tool-development.md b/nexus-sdk/tool-development.md index 8289dbb..39a5361 100644 --- a/nexus-sdk/tool-development.md +++ b/nexus-sdk/tool-development.md @@ -70,4 +70,3 @@ Each Nexus Tool should have a clear and publicly accessible README file that des If using Rust, the `main.rs` file should include this documentation via `#![doc = include_str!("../path/to/README.md")]`. See also [an example README file](../tools/llm-openai-chat-completion/README.md). - diff --git a/nexus-sdk/toolkit-rust.md b/nexus-sdk/toolkit-rust.md index f23c95a..c3e71e7 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,7 +8,7 @@ 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: @@ -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::*; @@ -184,7 +184,7 @@ Notice that the `invoke` function does not return a `Result`. This is because er ### `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`. @@ -224,3 +224,9 @@ async fn main() { } ``` + + +[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 3cfc7ae7c2108f3fc98ce867f486c09a63a13a58 Mon Sep 17 00:00:00 2001 From: devops-talus <184664591+devops-talus@users.noreply.github.com> Date: Tue, 12 Aug 2025 16:00:08 +0000 Subject: [PATCH 2/2] chore(docs): format markdown links --- nexus-sdk/cli.md | 5 +---- nexus-sdk/guides/dag-construction.md | 15 +++++---------- 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/setup.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 +++++----------- 12 files changed, 22 insertions(+), 37 deletions(-) diff --git a/nexus-sdk/cli.md b/nexus-sdk/cli.md index d4ca896..6157d81 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. @@ -306,6 +306,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/guides/dag-construction.md b/nexus-sdk/guides/dag-construction.md index d8cb2b0..5598269 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. @@ -100,8 +100,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) @@ -158,7 +158,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 @@ -230,10 +230,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/v0.1.0/cli/src/dag/_dags). - - -[nexus-next-workflow]: ../../nexus-next/packages/workflow.md -[example-dags]: https://github.com/Talus-Network/nexus-sdk/tree/v0.1.0/cli/src/dag/_dags -[nexus-cli]: ../cli.md diff --git a/nexus-sdk/guides/llm-openai-chat-prep-tool.md b/nexus-sdk/guides/llm-openai-chat-prep-tool.md index 909bc42..75e5863 100644 --- a/nexus-sdk/guides/llm-openai-chat-prep-tool.md +++ b/nexus-sdk/guides/llm-openai-chat-prep-tool.md @@ -381,3 +381,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 34e89c2..eb4e346 100644 --- a/nexus-sdk/guides/math-branching-dag-builder.md +++ b/nexus-sdk/guides/math-branching-dag-builder.md @@ -487,3 +487,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 e7e2a8a..b6f4154 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. @@ -608,9 +608,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 23b0b3b..a5ca1c3 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 @@ -668,7 +668,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/setup.md b/nexus-sdk/guides/setup.md index f0b612c..d20ab5d 100644 --- a/nexus-sdk/guides/setup.md +++ b/nexus-sdk/guides/setup.md @@ -160,3 +160,4 @@ Open the [Talus Sui Explorer](https://explorer.devnet.taluslabs.dev/). --- 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-firewall.md b/nexus-sdk/guides/tool-firewall.md index 8ecca40..8b2f782 100644 --- a/nexus-sdk/guides/tool-firewall.md +++ b/nexus-sdk/guides/tool-firewall.md @@ -73,3 +73,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 the security of your deployment. + diff --git a/nexus-sdk/index.md b/nexus-sdk/index.md index f948eac..af13085 100644 --- a/nexus-sdk/index.md +++ b/nexus-sdk/index.md @@ -40,3 +40,4 @@ Docs: - [Tool Development Guidelines](tool-development.md) - [Nexus Toolkit Rust](toolkit-rust.md) + diff --git a/nexus-sdk/tool-development.md b/nexus-sdk/tool-development.md index 39a5361..8289dbb 100644 --- a/nexus-sdk/tool-development.md +++ b/nexus-sdk/tool-development.md @@ -70,3 +70,4 @@ Each Nexus Tool should have a clear and publicly accessible README file that des If using Rust, the `main.rs` file should include this documentation via `#![doc = include_str!("../path/to/README.md")]`. See also [an example README file](../tools/llm-openai-chat-completion/README.md). + diff --git a/nexus-sdk/toolkit-rust.md b/nexus-sdk/toolkit-rust.md index c3e71e7..f23c95a 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::*; @@ -184,7 +184,7 @@ Notice that the `invoke` function does not return a `Result`. This is because er ### `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`. @@ -224,9 +224,3 @@ async fn main() { } ``` - - -[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