Search
Search docs, blog posts, and ecosystem packages with citations.
Enter a query to see grounded citations.
Focused example for SetState, ReplaceState, DeleteKeys, SetPath, and DeletePath via pure cmd execution.
defmodule AgentJido.Demos.StateOps.SetNestedValueAction do
@moduledoc """
Sets a nested value using `StateOp.SetPath`.
"""
alias Jido.Agent.StateOp
use Jido.Action,
name: "set_nested_value",
description: "Sets nested value by path",
schema: [
path: [type: {:list, :atom}, required: true],
value: [type: :any, required: true]
]
@impl true
def run(%{path: path, value: value}, _context) do
{:ok, %{}, %StateOp.SetPath{path: path, value: value}}
end
end