A Jido.Plugin providing AI-powered planning capabilities.
This plugin exposes three planning actions:
Plan- Generate structured plans from goals with constraints and resourcesDecompose- Break down complex goals into hierarchical sub-goalsPrioritize- Order tasks by priority based on given criteria
Signal Contracts
planning.plan->Jido.AI.Actions.Planning.Planplanning.decompose->Jido.AI.Actions.Planning.Decomposeplanning.prioritize->Jido.AI.Actions.Planning.Prioritize
Mount State Defaults
mount/2 initializes shared defaults consumed by planning actions when caller
params omit those fields:
default_model::planningdefault_max_tokens:4096default_temperature:0.7
Action-specific inputs remain action-owned:
Plan:goal+ optionalconstraints,resources,max_stepsDecompose:goal+ optionalmax_depth,contextPrioritize:tasks+ optionalcriteria,context
Usage
Attach to an agent:
defmodule MyAgent do
use Jido.Agent,
plugins: [
{Jido.AI.Plugins.Planning, []}
]
endOr use the action directly:
Jido.Exec.run(Jido.AI.Actions.Planning.Plan, %{
goal: "Build a web application",
constraints: ["Must use Elixir", "Budget limited"],
resources: ["2 developers", "3 months"]
})Model Resolution
The plugin uses Jido.AI.resolve_model/1 to resolve model aliases:
:fast- Quick model for simple tasks:capable- Capable model for complex tasks:planning- Model optimized for planning (default:anthropic:claude-sonnet-4-20250514)
Direct model specs are also supported.
Architecture Notes
Direct ReqLLM Calls: Planning actions call ReqLLM directly. Specialized Prompts: Each action uses a task-specific system prompt. Lightweight State: Plugin state only stores execution defaults.
Summary
Functions
Returns metadata for Jido.Discovery integration.
Returns the list of action modules provided by this plugin.
Returns the capabilities provided by this plugin.
Returns the plugin's category.
Returns the Zoi schema for per-agent configuration.
Returns the plugin's description.
Pre-routing hook for incoming signals.
Returns the plugin manifest with all metadata.
Initialize plugin state when mounted to an agent.
Returns the plugin's name.
Returns the OTP application for config resolution.
Returns the plugin specification with optional per-agent configuration.
Returns the requirements for this plugin.
Returns the schedules for this plugin.
Returns the schema for plugin state.
Returns signal patterns this plugin responds to.
Returns the signal routes for this plugin.
Returns the signal router for this plugin.
Returns whether this plugin is a singleton.
Returns the key used to store plugin state in the agent.
Returns the sensor subscriptions for this plugin.
Returns the plugin's tags.
Transform the result returned from action execution.
Returns the plugin's version.
Functions
@spec __plugin_metadata__() :: map()
Returns metadata for Jido.Discovery integration.
This function is used by Jido.Discovery to index plugins
for fast lookup and filtering.
@spec actions() :: [module()]
Returns the list of action modules provided by this plugin.
@spec capabilities() :: [atom()]
Returns the capabilities provided by this plugin.
@spec category() :: String.t() | nil
Returns the plugin's category.
@spec config_schema() :: Zoi.schema() | nil
Returns the Zoi schema for per-agent configuration.
@spec description() :: String.t() | nil
Returns the plugin's description.
Pre-routing hook for incoming signals.
Currently returns :continue to allow normal routing.
@spec manifest() :: Jido.Plugin.Manifest.t()
Returns the plugin manifest with all metadata.
The manifest provides compile-time metadata for discovery and introspection, including capabilities, requirements, signal routes, and schedules.
Initialize plugin state when mounted to an agent.
Returns initial state with any configured defaults.
@spec name() :: String.t()
Returns the plugin's name.
@spec otp_app() :: atom() | nil
Returns the OTP application for config resolution.
@spec plugin_spec(map()) :: Jido.Plugin.Spec.t()
Returns the plugin specification with optional per-agent configuration.
Examples
spec = MyModule.plugin_spec(%{})
spec = MyModule.plugin_spec(%{custom_option: true})
@spec requires() :: [tuple()]
Returns the requirements for this plugin.
@spec schedules() :: [tuple()]
Returns the schedules for this plugin.
@spec schema() :: Zoi.schema() | nil
Returns the schema for plugin state.
Defines the structure and defaults for Planning plugin state.
@spec signal_patterns() :: [String.t()]
Returns signal patterns this plugin responds to.
@spec signal_routes() :: [tuple()]
Returns the signal routes for this plugin.
Returns the signal router for this plugin.
Maps signal patterns to action modules.
@spec singleton?() :: boolean()
Returns whether this plugin is a singleton.
@spec state_key() :: atom()
Returns the key used to store plugin state in the agent.
@spec subscriptions() :: [Jido.Plugin.sensor_subscription()]
Returns the sensor subscriptions for this plugin.
@spec tags() :: [String.t()]
Returns the plugin's tags.
Transform the result returned from action execution.
Currently passes through results unchanged.
@spec vsn() :: String.t() | nil
Returns the plugin's version.