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.
PlanningAgent
Defined in the specialized module.
Rust AI Agent SDK
Planning agent for multi-step task planning
Fields
| Name | Type | Description |
|---|
config | PlanningAgentConfig | Configuration |
plan | Vec<PlanningStep> | Current plan |
current_step | usize | Current step index |
Methods
new
fn new(config: PlanningAgentConfig) -> Self
Create a new planning agent
Parameters:
| Name | Type |
|---|
config | PlanningAgentConfig |
create_plan
fn create_plan(&mut self, task: &str) -> Vec<PlanningStep>
Create a plan from a task
Parameters:
add_step
fn add_step(&mut self, description: impl Into<String>) -> ()
Add a step to the plan
Parameters:
| Name | Type |
|---|
description | impl Into<String> |
current
fn current(&self) -> Option<&PlanningStep>
Get current step
complete_step
fn complete_step(&mut self, result: Option<String>) -> ()
Mark current step as complete
Parameters:
| Name | Type |
|---|
result | Option<String> |
fail_step
fn fail_step(&mut self, error: impl Into<String>) -> ()
Mark current step as failed
Parameters:
| Name | Type |
|---|
error | impl Into<String> |
steps
fn steps(&self) -> &[PlanningStep]
Get all steps
is_complete
fn is_complete(&self) -> bool
Check if plan is complete
progress
fn progress(&self) -> f32
Get progress percentage
Source
View on GitHub
praisonai/src/parity/specialized.rs at line 178