CodeFizz
ToolsDemoDocsRoadmapChangelogPricingFAQ
Get the plugin

Getting Started

  • Introduction
  • Quick Start
  • Requirements
  • Installing the CLI
  • License & Machines

Guides

  • Installing the Plugin
  • The AI Skill
  • CLI vs MCP
  • Multiple Editors
  • How It Works
  • Discovering Commands

Walkthroughs

  • Build a Blueprint with AI
  • Author a Material Graph
  • Create a Niagara System

Reference

  • Reference
  • Niagara
  • PCG
  • Materials
  • StateTree
  • Sequencer
  • Level Actors
  • Project Settings
  • Blueprints
  • Blueprint Structs
  • Enhanced Input
  • Asset Management
  • Bulk Asset Ops
  • Data Assets
  • Object Properties
  • UMG Widgets
  • Data Tables
  • Curves
  • Console Commands
  • Profiling
  • Core
  • Debug

Help

  • FAQ
  • Troubleshooting
  • For AI Agents
DocsReferenceStateTree

StateTree

Every StateTree command in CodeFizz Editor Agent, with parameters and examples.

Loading…
PreviousMaterialsNextSequencer
CodeFizz

A drop-in Unreal Engine 5 plugin that exposes the entire editor surface (Blueprints, Materials, Niagara, PCG, StateTree, Insights profiling, and more) over the Model Context Protocol. Connect Claude Code, Cursor, VS Code, or any MCP-compatible client and let your AI build inside the engine.

Product

  • Features
  • Docs
  • Tools
  • Demo
  • Roadmap
  • Changelog
  • Pricing
  • FAQ

Resources

  • Install guide
  • Discord
  • YouTube
  • Open-source edition
  • Manage subscription

Legal

  • Refund Policy
  • Privacy Policy
  • Terms of Service

© 2026 CodeFizz. All rights reserved.

CodeFizz Editor Agent is a CodeFizz product. Payments processed by Polar Software, Inc. (Polar), the Merchant of Record.

42 commands. Each shows its parameters and an example, and has a copyable deep link, so you (or an AI agent) can jump straight to one.

get_statetree_info

Get StateTree overview (schema, counts)

Returns a compact overview of the StateTree: schema class, state count, evaluator count, global task count, parameter count, and color count.

ParameterTypeRequiredDescription
asset_pathstringYesContent path to the StateTree asset
example
cfa get_statetree_info --asset-path /Game/AI/ST_HollowCrawler
export_statetree

Export a StateTree to a complete self-contained JSON file

Writes a full JSON description of the StateTree to Saved/CodeFizzEditorAgent/Exports/<name>_<stamp>/<name>.statetree.json and returns the file path plus a compact summary. Reading the file alone tells you how the tree works: schema (class + /Script path), theme colors, tree parameters, every node (task/condition/evaluator/consideration/global task) with node_kind (cpp or blueprint), the C++ struct path (/Script/...) or the Blueprint asset path (/Game or /PluginName), resolved property values, exposed Blueprint pins, and property bindings (source and target paths). States are emitted as a hierarchy with per-state resolved color (display name + RGBA + hex), selection behavior, child/sibling order, and full transitions. Pass --inline to also return the whole document in the response instead of only the file path.

ParameterTypeRequiredDescription
asset_pathstringYesContent path to the StateTree asset
inlineboolNoAlso return the full export document inline (default false = file path only)
example
cfa export_statetree --asset-path /Game/AI/ST_HollowCrawler
cfa export_statetree --asset-path /Game/AI/ST_HollowCrawler --inline
get_statetree_states

Get state hierarchy tree

Returns the full state hierarchy as a JSON tree. Each state includes name, type, ID, index path, task/transition counts, and a children array. Use max_depth to limit recursion and name_filter for substring matching on state names.

ParameterTypeRequiredDescription
asset_pathstringYesContent path to the StateTree asset
max_depthintNoMax recursion depth (-1=unlimited, 0=roots only)
name_filterstringNoCase-insensitive substring filter on state names
example
cfa get_statetree_states --asset-path /Game/AI/ST_HollowCrawler
cfa get_statetree_states --asset-path /Game/AI/ST_HollowCrawler --max-depth 1
cfa get_statetree_states --asset-path /Game/AI/ST_HollowCrawler --name-filter "Attack"
get_statetree_state

Get detailed info for a single state

Returns full details for one state: all properties, tasks with their properties, enter conditions, transitions, and considerations. Identify by index path, name, or GUID.

ParameterTypeRequiredDescription
asset_pathstringYesContent path to the StateTree asset
statestringNoState index path (e.g. '0/1/2')
state_namestringNoState name (case-insensitive)
state_guidstringNoState GUID string
example
cfa get_statetree_state --asset-path /Game/AI/ST_HollowCrawler --state "0/0"
cfa get_statetree_state --asset-path /Game/AI/ST_HollowCrawler --state-name Patrol
cfa get_statetree_state --asset-path /Game/AI/ST_HollowCrawler --state-guid "XXXXXXXX..."
get_statetree_evaluators

Get global evaluators with properties

ParameterTypeRequiredDescription
asset_pathstringYesContent path to the StateTree asset
filterstringNoSubstring filter on evaluator class name
example
cfa get_statetree_evaluators --asset-path /Game/AI/ST_HollowCrawler
get_statetree_global_tasks

Get global tasks with properties

ParameterTypeRequiredDescription
asset_pathstringYesContent path to the StateTree asset
filterstringNoSubstring filter on task class name
example
cfa get_statetree_global_tasks --asset-path /Game/AI/ST_HollowCrawler
get_statetree_parameters

Get tree-level parameters

ParameterTypeRequiredDescription
asset_pathstringYesContent path to the StateTree asset
example
cfa get_statetree_parameters --asset-path /Game/AI/ST_HollowCrawler
get_statetree_node

Get detailed info for a single node by GUID

Returns full details for a task, evaluator, or condition including all properties, instance data, and context (which state it belongs to).

ParameterTypeRequiredDescription
asset_pathstringYesContent path to the StateTree asset
node_guidstringYesGUID of the node
get_statetree_bindings

Get property bindings with full path details

Returns all property bindings with source/target node names, struct IDs, and property paths. Optionally filter to bindings involving a specific node.

ParameterTypeRequiredDescription
asset_pathstringYesContent path to the StateTree asset
node_guidstringNoFilter to bindings involving this node
get_statetree_full_info

Get complete StateTree data in one call

Returns complete StateTree data with verbosity control. 'summary'=counts only, 'standard'=all states/tasks/conditions, 'full'=everything+bindings inline. Use 'sections' to filter: states,evaluators,global_tasks,parameters,bindings.

ParameterTypeRequiredDescription
asset_pathstringYesContent path to the StateTree asset
verbositystringNosummary, standard, or full (default: standard)
sectionsstringNoComma-separated section filter (empty=all)
search_statetree_nodes

Search for nodes by class name or category

Searches entire StateTree for tasks, evaluators, conditions, or considerations matching a class filter. Returns each match with its location context.

ParameterTypeRequiredDescription
asset_pathstringYesContent path to the StateTree asset
class_filterstringNoSubstring filter on node class name
categorystringNoFilter by category: task, evaluator, condition, consideration, global_task
create_statetree

Create a new StateTree asset

Creates a new StateTree data asset with the specified schema. Available schemas: MassStateTreeSchema, StateTreeComponentSchema, StateTreeAIComponentSchema, CameraDirectorStateTreeSchema.

ParameterTypeRequiredDescription
asset_pathstringYesContent path for the new asset
schema_classstringYesSchema class name
example
cfa create_statetree --asset-path /Game/AI/ST_NewTree --schema-class MassStateTreeSchema
add_statetree_state

Add a state to the tree

Adds a new state. Omit parent params for a root-level state. state_type: State, Group, Linked, LinkedAsset, Subtree.

ParameterTypeRequiredDescription
asset_pathstringYesContent path to the StateTree asset
namestringYesName for the new state
statestringNoParent state index path
state_namestringNoParent state name
state_guidstringNoParent state GUID
state_typestringNoState/Group/Linked/LinkedAsset/Subtree
selection_behaviorstringNoTrySelectChildrenInOrder, TrySelectChildrenAtRandom, etc.
positionintNoInsert position (-1=append)
example
cfa add_statetree_state --asset-path /Game/AI/ST_Tree --name Patrol
cfa add_statetree_state --asset-path /Game/AI/ST_Tree --name Attack --state-name Root --state-type State
add_statetree_task

Add a task to a state

Adds a task node to a state's task list. Supports engine and custom task classes.

ParameterTypeRequiredDescription
asset_pathstringYesContent path to the StateTree asset
task_classstringYesTask struct name or full path
statestringNoState index path
state_namestringNoState name
state_guidstringNoState GUID
propertiesjsonNoJSON object for task node properties
instance_propertiesjsonNoJSON object for task instance data properties
example
cfa add_statetree_task --asset-path /Game/AI/ST_Tree --state-name Patrol --task-class MassEnemyNestPatrolTask --properties '{"CheckInterval":3.0}'
add_statetree_evaluator

Add a global evaluator

ParameterTypeRequiredDescription
asset_pathstringYesContent path to the StateTree asset
evaluator_classstringYesEvaluator struct name or full path
propertiesjsonNoJSON object for evaluator properties
instance_propertiesjsonNoJSON object for instance data properties
example
cfa add_statetree_evaluator --asset-path /Game/AI/ST_Tree --evaluator-class MassEnemyHasTargetEvaluator
add_statetree_global_task

Add a global task

ParameterTypeRequiredDescription
asset_pathstringYesContent path to the StateTree asset
task_classstringYesTask struct name
propertiesjsonNoJSON object for task properties
instance_propertiesjsonNoJSON object for instance data properties
example
cfa add_statetree_global_task --asset-path /Game/AI/ST_Tree --task-class MassEnemyTargetLocationEvaluator
add_statetree_condition

Add a condition to state enter or transition

Adds a condition node to either a state's enter conditions or a transition's conditions.

ParameterTypeRequiredDescription
asset_pathstringYesContent path to the StateTree asset
condition_classstringYesCondition struct name
statestringNoState index path
state_namestringNoState name
state_guidstringNoState GUID
targetstringNoenter_conditions or transition
transition_indexintNoRequired when target=transition
operandstringNoAnd or Or
propertiesjsonNoJSON object for condition properties
instance_propertiesjsonNoJSON object for instance data properties
example
cfa add_statetree_condition --asset-path /Game/AI/ST_Tree --state-name Patrol --condition-class StateTreeCompareBoolCondition --target enter_conditions --properties '{"bInvert":false}'
add_statetree_consideration

Add a utility consideration to a state

Adds a consideration (utility scoring) node to a state. Used with utility-based selection behaviors (TrySelectChildrenWithHighestUtility /...WeightedByUtility).

ParameterTypeRequiredDescription
asset_pathstringYesContent path to the StateTree asset
consideration_classstringYesConsideration struct name (subclass of FStateTreeConsiderationBase)
statestringNoState index path
state_namestringNoState name
state_guidstringNoState GUID
propertiesjsonNoJSON object for consideration properties
example
cfa add_statetree_consideration --asset-path /Game/AI/ST_Tree --state-name Patrol --consideration-class StateTreeFloatInputConsideration --properties '{"Input":0.5}'
add_statetree_transition

Add a transition to a state

Adds a transition with trigger, target state, priority, and optional delay.

ParameterTypeRequiredDescription
asset_pathstringYesContent path to the StateTree asset
triggerstringYesOnStateCompleted/OnStateFailed/OnStateSucceeded/OnTick/OnEvent/OnDelegate
statestringNoSource state index path
state_namestringNoSource state name
state_guidstringNoSource state GUID
target_statestringNoTarget: index path or TreeSucceeded/TreeFailed/TreeStopped/NextSibling
target_state_namestringNoTarget state name
target_state_guidstringNoTarget state GUID
prioritystringNoLow/Normal/Medium/High/Critical
delayfloatNoDelay in seconds
delay_variancefloatNoRandom variance on delay
event_tagstringNoGameplay tag for OnEvent trigger
example
cfa add_statetree_transition --asset-path /Game/AI/ST_Tree --state-name Patrol --trigger OnTick --target-state-name WaveMarch --priority Normal
add_statetree_parameter

Add a tree-level parameter

ParameterTypeRequiredDescription
asset_pathstringYesContent path to the StateTree asset
namestringYesParameter name
typestringYesProperty type (bool/int32/float/FVector/FName/FString/etc.)
valuestringNoOptional initial value (scalar types: bool/byte/int32/int64/float/double/name/string/text). Without it the parameter defaults to zero/empty.
example
cfa add_statetree_parameter --asset-path /Game/AI/ST_Tree --name MaxHealth --type float
set_statetree_parameter

Set the value of an existing tree-level parameter

Updates the value of a tree parameter (root property bag) that was already added with add_statetree_parameter. The type is inferred from the parameter, so only name + value are needed. Scalar types only (bool/byte/int32/int64/float/double/name/string/text).

ParameterTypeRequiredDescription
asset_pathstringYesContent path to the StateTree asset
namestringYesExisting parameter name
valuestringYesNew value (parsed to the parameter's declared type)
example
cfa set_statetree_parameter --asset-path /Game/AI/ST_Tree --name SightRange --value 1200
set_statetree_state_property

Set a property on a state

Modifies a state property: Name, Type, SelectionBehavior, Enabled, Tag, Weight, etc.

ParameterTypeRequiredDescription
asset_pathstringYesContent path to the StateTree asset
property_namestringYesProperty to set
valuestringYesNew value
statestringNoState index path
state_namestringNoState name
state_guidstringNoState GUID
set_statetree_node_property

Set a property on a task/evaluator/condition

Modifies a property on a node identified by GUID. Target 'node' for the struct itself, 'instance' for instance data.

ParameterTypeRequiredDescription
asset_pathstringYesContent path to the StateTree asset
node_guidstringYesGUID of the node
property_namestringYesProperty to set
property_valuejsonYesNew value
targetstringNonode or instance
set_statetree_transition_property

Set a property on a transition

Modifies Trigger, Priority, TargetState, DelayDuration, Enabled, etc.

ParameterTypeRequiredDescription
asset_pathstringYesContent path to the StateTree asset
transition_indexintYesTransition index
property_namestringYesProperty to set
valuestringYesNew value
statestringNoState index path
state_namestringNoState name
state_guidstringNoState GUID
set_statetree_schema

Change the schema of a StateTree

ParameterTypeRequiredDescription
asset_pathstringYesContent path to the StateTree asset
schema_classstringYesSchema class name
example
cfa set_statetree_schema --asset-path /Game/AI/ST_Tree --schema-class MassStateTreeSchema
set_statetree_component_tree

Assign a StateTree asset to a StateTree component (placed actor or Blueprint)

Sets the StateTreeRef of a UStateTreeComponent / UStateTreeAIComponent via the same path the editor uses (FStateTreeReference::SetStateTree, which also syncs the parameter bag). Targets either a placed level actor (actor_label) or a Blueprint's component template (blueprint_path, SCS or native CDO component). If the actor/BP has several StateTree components, disambiguate with component_name. Note: a StateTreeAIComponent runs on the AIController, so for AI pawns assign it on the controller Blueprint. The response reports the tree's schema class so you can catch schema mismatches early.

ParameterTypeRequiredDescription
statetree_pathstringYesContent path to the StateTree asset to assign
actor_labelstringNoPlaced actor label (exactly one of actor_label / blueprint_path)
blueprint_pathstringNoBlueprint asset path (sets the component template)
component_namestringNoComponent name when the target has several StateTree components
start_logic_automaticallyboolNoOptionally also set bStartLogicAutomatically
example
cfa set_statetree_component_tree --actor-label EnemyFollower1 --statetree-path /Game/AI/ST_Follower
cfa set_statetree_component_tree --blueprint-path /Game/AI/BP_EnemyController --statetree-path /Game/AI/ST_Follower --start-logic-automatically true
add_statetree_binding

Add a property binding between nodes / tree parameters

Binds a source property to a target property. Each end is either a node (<side>_node_guid + <side>_property) or a tree parameter (<side>_tree_parameter). Tree parameters are the valid source for considerations, which run at selection time.

ParameterTypeRequiredDescription
asset_pathstringYesContent path to the StateTree asset
source_node_guidstringNoSource node GUID (node-source form)
source_propertystringNoSource property path (node-source form; optional for context)
source_tree_parameterstringNoSource tree-parameter name (parameter-source form)
source_contextstringNoSource schema context name, e.g. Actor / AIController (context-source form)
target_node_guidstringNoTarget node GUID (node-target form)
target_propertystringNoTarget property path (node-target form)
target_tree_parameterstringNoTarget tree-parameter name (parameter-target form)
example
cfa add_statetree_binding --asset-path /Game/AI/ST_Tree --source-node-guid AAAA... --source-property Out --target-node-guid BBBB... --target-property In
cfa add_statetree_binding --asset-path /Game/AI/ST_Tree --source-tree-parameter Score --target-node-guid CCCC... --target-property Input
bind_statetree_delegate

Bind a delegate dispatcher to a listener

Binds a FStateTreeDelegateDispatcher property (source) to a FStateTreeDelegateListener. The listener is either a node property (listener_node_guid + listener_property) or a transition's DelegateListener (transition_index + state identifier), which drives an OnDelegate transition. Works on UE 5.6/5.7/5.8.

ParameterTypeRequiredDescription
asset_pathstringYesContent path to the StateTree asset
dispatcher_node_guidstringYesGUID of the node owning the dispatcher property
dispatcher_propertystringYesName of the FStateTreeDelegateDispatcher property
listener_node_guidstringNoGUID of the node owning the listener property (node-listener form)
listener_propertystringNoName of the FStateTreeDelegateListener property
transition_indexintNoTransition index (transition-listener form; drives OnDelegate)
statestringNoState index path (for transition form)
state_namestringNoState name (for transition form)
state_guidstringNoState GUID (for transition form)
example
cfa bind_statetree_delegate --asset-path /Game/AI/ST_Tree --dispatcher-node-guid AAAA... --dispatcher-property OnDone --listener-node-guid BBBB... --listener-property Listener
cfa bind_statetree_delegate --asset-path /Game/AI/ST_Tree --dispatcher-node-guid AAAA... --dispatcher-property OnDone --state-name Patrol --transition-index 0
bind_statetree_task_completion

Bind a listener to a task's completion (UE 5.8+)

Binds a delegate listener to a task's auto-generated completion dispatcher, so it fires when the task Completes/Succeeds/Fails. Target is a node listener (listener_node_guid + listener_property) or a transition's DelegateListener (transition_index + state identifier). Requires UE 5.8+.

ParameterTypeRequiredDescription
asset_pathstringYesContent path to the StateTree asset
task_guidstringYesGUID of the task that broadcasts on completion
completionstringNoCompletes/Succeeds/Fails
listener_node_guidstringNoGUID of the node owning the listener property (node-listener form)
listener_propertystringNoName of the FStateTreeDelegateListener property
transition_indexintNoTransition index (transition-listener form; drives OnDelegate)
statestringNoState index path (for transition form)
state_namestringNoState name (for transition form)
state_guidstringNoState GUID (for transition form)
example
cfa bind_statetree_task_completion --asset-path /Game/AI/ST_Tree --task-guid AAAA... --completion Succeeds --state-name Patrol --transition-index 0
set_statetree_color

Add or update a theme color

ParameterTypeRequiredDescription
asset_pathstringYesContent path to the StateTree asset
namestringYesColor display name
colorstringYesHex '#RRGGBB' or 'R,G,B,A' floats
example
cfa set_statetree_color --asset-path /Game/AI/ST_Tree --name "Attack" --color "#FF0000"
remove_statetree_state

Remove a state and its children

ParameterTypeRequiredDescription
asset_pathstringYesContent path to the StateTree asset
statestringNoState index path
state_namestringNoState name
state_guidstringNoState GUID
remove_statetree_node

Remove a task/evaluator/condition by GUID

ParameterTypeRequiredDescription
asset_pathstringYesContent path to the StateTree asset
node_guidstringYesGUID of the node to remove
remove_statetree_transition

Remove a transition from a state

ParameterTypeRequiredDescription
asset_pathstringYesContent path to the StateTree asset
transition_indexintYesIndex of the transition
statestringNoState index path
state_namestringNoState name
state_guidstringNoState GUID
remove_statetree_binding

Remove a property binding

ParameterTypeRequiredDescription
asset_pathstringYesContent path to the StateTree asset
binding_indexintYesIndex of the binding to remove
remove_statetree_parameter

Remove a tree-level parameter

ParameterTypeRequiredDescription
asset_pathstringYesContent path to the StateTree asset
namestringYesParameter name to remove
compile_statetree

Compile a StateTree and return errors

ParameterTypeRequiredDescription
asset_pathstringYesContent path to the StateTree asset
example
cfa compile_statetree --asset-path /Game/AI/ST_HollowCrawler
list_statetree_node_types

List available task/evaluator/condition types

Lists all available node types for the StateTree's schema. Use category to filter by task, evaluator, or condition.

ParameterTypeRequiredDescription
asset_pathstringYesContent path to the StateTree asset
categorystringYestask, evaluator, or condition
filterstringNoSubstring filter on class name
example
cfa list_statetree_node_types --asset-path /Game/AI/ST_Tree --category task
cfa list_statetree_node_types --asset-path /Game/AI/ST_Tree --category evaluator --filter "Mass"
get_statetree_binding_sources

List valid binding sources for a node (context/params/functions)

Given a target node, lists every source you can bind its properties from, tree parameters, schema context (Actor / AIController), preceding evaluators/tasks, and property functions, each with its bindable properties and C++ types. Mirrors the editor's bind dropdown.

ParameterTypeRequiredDescription
asset_pathstringYesContent path to the StateTree asset
target_node_guidstringYesGUID of the node you want to bind INTO
filterstringNoCase-insensitive substring filter on property names
max_propertiesintNoMax properties listed per source
example
cfa get_statetree_binding_sources --asset-path /Game/AI/ST_Tree --target-node-guid AAAA...
cfa get_statetree_binding_sources --asset-path /Game/AI/ST_Tree --target-node-guid AAAA... --filter Speed
search_statetree_properties

Deep type-aware property search across a node's binding sources

Searches the properties accessible from a target node (tree params, schema context like Actor/AIController, preceding nodes) by name, drilling into component object properties and nested structs, so searching 'speed' surfaces 'CharacterMovement.MaxWalkSpeed'. Returns ranked top-N results (best name match first) with the full dotted path + C++ type, ready to pass as a bind path. Context-efficient: only matches are returned.

ParameterTypeRequiredDescription
asset_pathstringYesContent path to the StateTree asset
target_node_guidstringYesGUID of the node defining accessible sources
querystringYesProperty name substring, e.g. 'speed'
type_filterstringNoOptional C++ type substring, e.g. 'float'
sourcestringNoOptional source name to restrict to, e.g. Actor / AIController
max_resultsintNoTop-N results to return (1-100)
max_depthintNoRecursion depth into components/structs (0-5)
example
cfa search_statetree_properties --asset-path /Game/AI/ST_Tree --target-node-guid AAAA... --query speed
cfa search_statetree_properties --asset-path /Game/AI/ST_Tree --target-node-guid AAAA... --query speed --source Actor --type-filter float --max-results 5 --max-depth 3
list_statetree_schemas

List available StateTree schema classes

Lists every concrete UStateTreeSchema subclass selectable at create_statetree / set_statetree_schema time.

ParameterTypeRequiredDescription
filterstringNoSubstring filter on schema class name
example
cfa list_statetree_schemas
cfa list_statetree_schemas --filter Mass
get_statetree_transition_targets

List valid transition targets for a StateTree

Returns all states (name, GUID, index_path, type) and meta-transition targets (None, TreeSucceeded, TreeFailed, TreeStopped, NextSibling, NextState, NextSelectableState). Use this to discover valid values for target_state when adding or modifying transitions.

ParameterTypeRequiredDescription
asset_pathstringYesContent path to the StateTree asset
example
cfa get_statetree_transition_targets --asset-path /Game/AI/ST_HollowCrawler
list_statetree_enum_values

List valid enum values for StateTree properties

Returns all valid values for a StateTree enum category. Use before creating states, transitions, or conditions to discover valid values. Categories: trigger, priority, state_type, selection_behavior, operand.

ParameterTypeRequiredDescription
categorystringYestrigger/priority/state_type/selection_behavior/operand
example
cfa list_statetree_enum_values --category trigger
cfa list_statetree_enum_values --category priority