> ## Documentation Index
> Fetch the complete documentation index at: https://agentclientprotocol.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Agent Plan

> How Agents communicate their execution plans

A plan describes how the Agent intends to carry out a task. It can be a list of steps or a Markdown document.

Agents **MAY** send plans to Clients through [`session/update`](https://agentclientprotocol.com/protocol/v1/draft/prompt-turn#3-agent-reports-output) notifications and update them as work progresses.

The `plan` update carries a single checklist. Clients that advertise `plan` during [initialization](https://agentclientprotocol.com/protocol/v1/draft/initialization.md#plan-operations) can also receive identified plans through `plan_update` and `plan_removed`.

## Creating plans

When the language model creates an execution plan, the Agent **SHOULD** report it to the Client:

```json theme={null}
{
  "jsonrpc": "2.0",
  "method": "session/update",
  "params": {
    "sessionId": "sess_abc123def456",
    "update": {
      "sessionUpdate": "plan",
      "entries": [
        {
          "content": "Analyze the existing codebase structure",
          "priority": "high",
          "status": "pending"
        },
        {
          "content": "Identify components that need refactoring",
          "priority": "high",
          "status": "pending"
        },
        {
          "content": "Create unit tests for critical functions",
          "priority": "medium",
          "status": "pending"
        }
      ]
    }
  }
}
```

**entries** `PlanEntry[]` *required*

An array of [plan entries](#plan-entries) representing the tasks to be
accomplished

## Plan operations

Agents **MUST NOT** send `plan_update` or `plan_removed` unless the Client advertised `plan`. If the Client omits `plan` or sends `null`, the Agent **MUST** use the `plan` update for structured checklists.

When the Client advertises `plan`, the Agent **SHOULD** send its plans with `plan_update` instead of `plan`. The `plan` object requires a `type` and a `planId` unique within the session. Each `plan_update` replaces the whole plan with that ID, even if its type changes. It does not affect other plans.

### Item-based plans

```json theme={null}
{
  "jsonrpc": "2.0",
  "method": "session/update",
  "params": {
    "sessionId": "sess_abc123def456",
    "update": {
      "sessionUpdate": "plan_update",
      "plan": {
        "type": "items",
        "planId": "plan-1",
        "entries": [
          {
            "content": "Analyze the existing codebase structure",
            "priority": "high",
            "status": "pending"
          }
        ]
      }
    }
  }
}
```

### Markdown plans

```json theme={null}
{
  "jsonrpc": "2.0",
  "method": "session/update",
  "params": {
    "sessionId": "sess_abc123def456",
    "update": {
      "sessionUpdate": "plan_update",
      "plan": {
        "type": "markdown",
        "planId": "implementation-plan",
        "content": "## Steps\n- [ ] Refactor module\n- [ ] Add tests",
        "path": "/home/user/project/PLAN.md"
      }
    }
  }
}
```

**plan.content** `string` *required*

The complete plan as Markdown, not just the text that changed.

**plan.path** `string | null`

The absolute path of the file that holds this plan. Omission and `null` are
equivalent and mean the plan has no file.

`path` **MUST** be an absolute path. Clients display `content` whether or not they can reach the file. They can use `path` to open it.

### Removing plans

```json theme={null}
{
  "jsonrpc": "2.0",
  "method": "session/update",
  "params": {
    "sessionId": "sess_abc123def456",
    "update": {
      "sessionUpdate": "plan_removed",
      "planId": "plan-1"
    }
  }
}
```

Agents **SHOULD** send `plan_removed` when a plan is cancelled, for example when the user rejects it or the Agent abandons it. A finished plan doesn't need to be removed. Clients **MUST** ignore `plan_removed` for a `planId` they don't know.

## Plan entries

Each plan entry represents a specific task or goal within the overall execution strategy:

**content** `string` *required*

A human-readable description of what this task aims to accomplish

**priority** `PlanEntryPriority` *required*

The relative importance of this task.

* `high`
* `medium`
* `low`

**status** `PlanEntryStatus` *required*

The current execution status of this task

* `pending`
* `in_progress`
* `completed`

## Updating plans

As the Agent progresses through the plan, it **SHOULD** report updates by sending more `session/update` notifications with the same structure.

For both `plan` and `items` plans, the Agent **MUST** send the complete list of entries and their current status in each update. The Client **MUST** replace the current checklist completely. For `plan_update`, this applies only to the plan with the given `planId`. An empty `entries` array empties the plan. Clients **MAY** hide an empty `items` plan.

### Dynamic planning

Plans can change during execution. The Agent **MAY** add, remove, or modify plan entries as it discovers new requirements or completes tasks.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.