Documentation Index
Fetch the complete documentation index at: https://docs.praison.ai/llms.txt
Use this file to discover all available pages before exploring further.
WorkflowContext
Defined in the workflows module.
Rust AI Agent SDK
Workflow context passed between agents
Fields
| Name | Type | Description |
|---|
variables | std::collections::HashMap<String | Variables available to all agents |
results | Vec<StepResult> | Results from previous steps |
Methods
new
Create a new empty context
set
fn set(&mut self, key: impl Into<String>, value: impl Into<String>) -> ()
Set a variable
Parameters:
| Name | Type |
|---|
key | impl Into<String> |
value | impl Into<String> |
get
fn get(&self, key: &str) -> Option<&String>
Get a variable
Parameters:
add_result
fn add_result(&mut self, result: StepResult) -> ()
Add a step result
Parameters:
last_result
fn last_result(&self) -> Option<&StepResult>
Get the last result
Source
View on GitHub
praisonai/src/workflows/mod.rs at line 64