Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
awpak-ai
awpak-ai is a Rust library for orchestrating the execution of artificial intelligence agents, system commands, and HTTP requests, modeled as a directed graph.
Each node in the graph can perform one of the following actions:
- Execute a system command.
- Make an HTTP request (e.g., to a REST API).
- Invoke an AI agent (such as a language model or custom logic).
This structure enables the creation of flexible and powerful pipelines. Each graph has an internal context, where the output of every executed node is stored. Subsequent nodes can access the outputs of one or more previously executed nodes from this context, enabling flexible and dynamic data flow throughout the execution.
Building a Graph
There are two main methods for creating a graph from a JSON definition:
Builds a graph from a JSON file located at the given file path.
Builds a graph from a JSON string provided directly in memory.
Both methods return a Graph instance ready to be executed.
Running the Graph
To execute a graph asynchronously, use the following method:
pub async
input: a string input passed to the graph at the start of execution.graph: the graph instance previously built using one of thegraph_from_*methods.
The result is the updated Graph after execution, along with any errors encountered during the process.
Example Usage
async
This pattern ensures that:
- You always retain access to the final state of the graph, even if an error occurred during execution.
- You can inspect the final output if successful (
graph.final_output). - You can log or handle the error if one occurred, without losing the graph context.
Use Cases
awpak-ai is ideal for:
- Coordinating language models (LLMs) or AI agents in complex workflows.
- Automating pipelines that combine AI, web services, and shell commands.
- Defining flexible, declarative flows in JSON for easy maintenance and dynamic reconfiguration.
Creating the JSON Definition
Manually writing a JSON graph definition can be complex because of the number of available options. To simplify this process, we provide a web-based editor that helps you build graphs interactively and export them as JSON.
➡ Getting Started with Graph JSON
The Getting Started guide will walk you through how to generate and customize a graph using the web editor and how to integrate it into your Rust project.