Skip to main content
The Task Planning Service provides AI-powered task planning capabilities, automatically breaking down complex tasks into actionable steps. It helps convert high-level task descriptions into structured execution plans.

Quick Start

Features

Task Decomposition

Break complex tasks into steps

AI-Powered Planning

Leverage AI for intelligent planning

Streaming Plans

Real-time plan generation updates

Context-Aware

Plans consider provided context

Generate Task Plan

Create a structured plan from a task description:
Parameters:
  • task_description (str, required): High-level description of the task
  • context (dict, optional): Additional context for planning
Returns: Dictionary containing the generated plan with steps

Plan with Context

Provide context to generate more accurate plans:
Context Fields (examples):
  • environment: Target environment (dev, staging, production)
  • service_name: Service or application name
  • resources: Available resources
  • constraints: Time, budget, or other constraints
  • requirements: Specific requirements or standards
  • existing_state: Current state information

Streaming Task Plans

Generate plans with real-time streaming updates:
Parameters:
  • task_description (str, required): Task to plan
  • context (dict, optional): Planning context
Yields: Plan generation updates as dictionaries
Use streaming for complex tasks that take longer to plan. This provides real-time feedback to users as the plan is being generated.

Complete Example

Here’s a complete example showing task planning workflow:

Error Handling

Handle task planning errors:

Use Cases

Deployment Planning

Incident Response

Infrastructure Setup

Onboarding

Migration Planning

Best Practices

Task Descriptions

  • Be Specific: Provide clear, detailed task descriptions
  • Define Success: Include success criteria in the description
  • Set Constraints: Mention time, budget, or resource constraints
  • Specify Dependencies: Note any dependencies or prerequisites

Context Provision

  • Relevant Information: Include all relevant context
  • Current State: Describe the current state clearly
  • Target State: Define the desired end state
  • Constraints: List limitations and requirements
  • Risk Factors: Mention known risks or concerns

Plan Usage

  • Review Plans: Always review generated plans before execution
  • Iterative Refinement: Generate detailed plans for complex steps
  • Team Input: Share plans with team for feedback
  • Adapt as Needed: Plans are guidelines; adapt based on reality

Streaming

  • Long Tasks: Use streaming for tasks that take time to plan
  • User Feedback: Show progress to users during planning
  • Handle Interruptions: Handle stream interruptions gracefully
  • Buffer Output: Buffer output for better user experience

Integration with Execution

Task planning integrates with execution services:

API Reference

Next Steps

Agents Service

Execute planned tasks with agents

Teams Service

Execute complex plans with teams

Jobs Service

Schedule planned tasks

Context Graph

Use graph context in planning