Generates a multi-step execution plan from a high-level goal.
The high-level goal to achieve
Optional context: PlanningContextAdditional context for planning
Optional options: PlanningOptionsPlanning configuration options
Generated execution plan
const plan = await engine.generatePlan(
'Analyze customer feedback and generate a report',
{ domainContext: 'E-commerce platform' },
{ strategy: 'react', maxSteps: 15 }
);
Decomposes a complex task into simpler subtasks.
The task description to decompose
Optional depth: numberMaximum decomposition depth (default: 3)
Task decomposition result
Validates a plan for feasibility and completeness.
Plan to validate
Validation result with any issues found
Refines an existing plan based on execution feedback. Uses self-reflection to identify issues and generate corrections.
Original plan to refine
Feedback from execution
Refined execution plan
Performs self-reflection on plan execution state.
Current plan
Current execution state
Reflection insights and suggested adjustments
Executes a single plan step.
Step to execute
Optional context: StepExecutionContextExecution context including previous results
Step execution result
Runs an autonomous goal pursuit loop. Yields progress updates and handles self-correction automatically.
Goal to pursue
Optional options: AutonomousLoopOptionsLoop configuration
Final execution summary
Progress updates including current step and observations
Saves current execution state for checkpointing/rollback.
Plan being executed
Current execution state
Checkpoint identifier
Restores execution state from a checkpoint.
Checkpoint to restore
Restored execution state
Gets the current execution state for a plan.
Plan identifier
Current execution state or null if not found
Interface for the AgentOS Planning Engine.
The Planning Engine provides sophisticated cognitive capabilities for autonomous agents, including:
Example