Jido.Agent.Directive.RunInstruction (Jido v2.0.0)

View Source

Execute a %Jido.Instruction{} at runtime and route the result back to cmd/2.

This directive lets strategies keep cmd/2 pure by emitting instruction execution requests instead of calling Jido.Exec.run/1 directly. The runtime executes the instruction, builds a result payload, then calls:

agent_module.cmd(agent, {result_action, payload})

Fields

  • instruction - The %Jido.Instruction{} to execute
  • result_action - Internal action atom/module for result handling in cmd/2
  • meta - Optional metadata echoed in the result payload

Summary

Functions

Returns the Zoi schema for RunInstruction.

Types

t()

@type t() :: %Jido.Agent.Directive.RunInstruction{
  instruction: any(),
  meta: map(),
  result_action: any()
}

Functions

schema()

@spec schema() :: Zoi.schema()

Returns the Zoi schema for RunInstruction.