# `Spectre.Action.Planner`
[🔗](https://github.com/elchemista/spectre/blob/0.4.0/lib/spectre/action/planner.ex#L1)

Port implemented by optional action-planning libraries.

A planner may inspect an LLM reply and return provider-neutral
`Spectre.Action` values. It cannot execute providers or mutate Agent state.

# `response`

```elixir
@type response() :: %{reply_text: String.t(), actions: [Spectre.Action.t() | map()]}
```

# `clean_reply`
*optional* 

```elixir
@callback clean_reply(String.t(), Spectre.Context.t() | map(), keyword()) :: String.t()
```

# `incremental_cleaner?`
*optional* 

```elixir
@callback incremental_cleaner?() :: boolean()
```

# `plan`
*optional* 

```elixir
@callback plan(String.t(), Spectre.Context.t() | map(), keyword()) ::
  {:ok, Spectre.Action.t() | map()} | {:error, term()}
```

# `plan_response`

```elixir
@callback plan_response(String.t(), Spectre.Context.t() | map(), keyword()) ::
  {:ok, response()} | {:error, term()}
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
