Supyagent
ToolsBuilt-in Tools

Plan Tool

Reference for the plan default tool: create_plan, update_plan, and get_plan for tracking multi-step tasks.

Plan Tool

Script: powers/plan.py Dependencies: pydantic

Create, track, and update structured plans with steps. Plans are stored as JSON files in .supyagent/plans/ within the working directory. This tool helps agents break down complex tasks into manageable steps and track progress.


create_plan

Create a new plan with a list of steps.

Input

FieldTypeDefaultDescription
titlestrrequiredTitle of the plan
stepslistrequiredList of plan step objects (see below)
working_dirstr"."Working directory for storing the plan

Each step object:

FieldTypeDefaultDescription
descriptionstrrequiredDescription of this step
statusstr"pending"Status: "pending", "in_progress", "completed", "skipped"
notesstr""Optional notes for this step

Output

FieldTypeDescription
okbooltrue if plan was created
plan_idstr8-character unique plan identifier
titlestrPlan title
steps_countintNumber of steps in the plan
errorstrError message on failure

Examples

// Create a deployment plan
{
  "title": "Deploy to production",
  "steps": [
    {"description": "Run test suite"},
    {"description": "Build Docker image"},
    {"description": "Push to container registry"},
    {"description": "Deploy to cluster"},
    {"description": "Run smoke tests"},
    {"description": "Update documentation"}
  ]
}
// Create with pre-set statuses
{
  "title": "Code review checklist",
  "steps": [
    {"description": "Read the PR description", "status": "completed", "notes": "Looks good"},
    {"description": "Review code changes", "status": "in_progress"},
    {"description": "Run tests locally", "status": "pending"},
    {"description": "Leave review comments", "status": "pending"}
  ]
}

update_plan

Update the status or notes of a specific step in a plan.

Input

FieldTypeDefaultDescription
plan_idstrrequiredID of the plan to update
step_indexintrequiredZero-based index of the step to update
statusstr"completed"New status: "pending", "in_progress", "completed", "skipped"
notesstrnullOptional notes to add to the step
working_dirstr"."Working directory where the plan is stored

Output

FieldTypeDescription
okbooltrue if update succeeded
plan_idstrPlan identifier
step_descriptionstrDescription of the updated step
new_statusstrThe new status that was set
errorstrError message on failure

Examples

// Mark first step as completed
{"plan_id": "abc12345", "step_index": 0, "status": "completed"}

// Mark step as in progress with notes
{
  "plan_id": "abc12345",
  "step_index": 1,
  "status": "in_progress",
  "notes": "Docker build started at 14:30"
}

// Skip a step
{"plan_id": "abc12345", "step_index": 3, "status": "skipped", "notes": "Not needed for this release"}

get_plan

Retrieve a plan by ID, or get the most recent plan if no ID is given.

Input

FieldTypeDefaultDescription
plan_idstrnullID of the plan to retrieve. If omitted, returns the most recent plan
working_dirstr"."Working directory where plans are stored

Output

FieldTypeDescription
okbooltrue if plan was found
plan_idstrPlan identifier
titlestrPlan title
stepslistArray of step status objects (see below)
completed_countintNumber of completed steps
total_countintTotal number of steps
errorstrError message on failure

Each step status object:

FieldTypeDescription
indexintZero-based step index
descriptionstrStep description
statusstrCurrent status
notesstrNotes for this step

Examples

// Get a specific plan
{"plan_id": "abc12345"}

// Get the most recent plan
{}

Example Output

{
  "ok": true,
  "plan_id": "abc12345",
  "title": "Deploy to production",
  "steps": [
    {"index": 0, "description": "Run test suite", "status": "completed", "notes": "All 42 tests passed"},
    {"index": 1, "description": "Build Docker image", "status": "completed", "notes": ""},
    {"index": 2, "description": "Push to container registry", "status": "in_progress", "notes": ""},
    {"index": 3, "description": "Deploy to cluster", "status": "pending", "notes": ""},
    {"index": 4, "description": "Run smoke tests", "status": "pending", "notes": ""},
    {"index": 5, "description": "Update documentation", "status": "pending", "notes": ""}
  ],
  "completed_count": 2,
  "total_count": 6
}

Storage

Plans are stored as JSON files in .supyagent/plans/:

.supyagent/
  plans/
    abc12345.json
    def67890.json

Each plan file contains:

{
  "plan_id": "abc12345",
  "title": "Deploy to production",
  "steps": [
    {"description": "Run test suite", "status": "completed", "notes": "All passed"},
    {"description": "Build Docker image", "status": "pending", "notes": ""}
  ]
}

Tips

  • Plans help agents manage complex multi-step tasks without losing track of progress
  • Use get_plan with no arguments to quickly check the current plan's status
  • The notes field is useful for recording details about each step (durations, results, issues)
  • Plans persist across agent sessions, so work can be resumed later
  • Step indices are zero-based -- the first step is index 0