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.
Plan
Defined in the planning module.
Rust AI Agent SDK
A plan consisting of multiple steps.
Fields
| Name | Type | Description |
|---|
id | String | Plan ID |
name | String | Plan name/goal |
description | Option<String> | Plan description |
steps | Vec<PlanStep> | Steps in the plan |
created_at | chrono::DateTime<chrono::Utc> | Created timestamp |
updated_at | chrono::DateTime<chrono::Utc> | Updated timestamp |
metadata | HashMap<String | Plan metadata |
Methods
new
fn new(name: impl Into<String>) -> Self
Create a new plan.
Parameters:
| Name | Type |
|---|
name | impl Into<String> |
description
fn description(mut self, desc: impl Into<String>) -> Self
Set description.
Parameters:
| Name | Type |
|---|
desc | impl Into<String> |
add_step
fn add_step(&mut self, step: PlanStep) -> ()
Add a step.
Parameters:
get_step
fn get_step(&self, id: &str) -> Option<&PlanStep>
Get step by ID.
Parameters:
get_step_mut
fn get_step_mut(&mut self, id: &str) -> Option<&mut PlanStep>
Get mutable step by ID.
Parameters:
completed_steps
fn completed_steps(&self) -> Vec<String>
Get completed step IDs.
next_step
fn next_step(&self) -> Option<&PlanStep>
Get next ready step.
progress
fn progress(&self) -> f64
Get progress percentage.
is_complete
fn is_complete(&self) -> bool
Check if plan is complete.
has_failed
fn has_failed(&self) -> bool
Check if plan has failed.
step_count
fn step_count(&self) -> usize
Get step count.
Source
View on GitHub
praisonai/src/planning/mod.rs at line 127