Skip to content

Intent Forge — Quickstart (15 minutes)

You'll build an agent that:

  1. Plans toward a goal (HasFood = true).
  2. Picks the cheaper of two paths.
  3. Drives execution via the built-in dispatcher subsystem — no StateTree or Behavior Tree required. (Both are supported; see the "Alternative runtimes" callout near the end.)

No C++ required for this tutorial. The endgame is a working pawn in PIE whose plan you can inspect via the Live Inspector tab (toolbar → Intent Forge → Open → Live Inspector).

Prerequisites

  • UE 5.7+ project with Intent Forge enabled in the .uproject.
  • Knowledge of: data assets, Blueprint, the Content Browser.

The default Auto dispatch mode needs no AI-runtime plugin. The plugin's GameplayStateTree dependency is for the optional IntentForgeStateTree module; you can ignore it for this tutorial.

Step 1 — Create the fact schema

  1. Right-click in the Content Browser → Miscellaneous → Data Asset → FactSchemaAsset. Name it DA_Schema_Forager.
  2. Open it. In Facts, add three entries:
Id Type Triggers Replan
HasFood Bool true
NearTree Bool true
NearLake Bool true
  1. Save.

Step 2 — Author two actions

These represent two ways to get food: forage from a tree (cheap, slow), or hunt at the lake (more expensive but always available).

  1. Right-click → Miscellaneous → Data Asset → IntentAction. Name it DA_Action_Forage.
  2. Open it and configure:

  3. Preconditions: add one row, set its type to Bool Fact EqualsFactId = NearTree, bExpected = true.

  4. Effects: add one row, Set Bool FactFactId = HasFood, bValue = true.
  5. Executor Class: Wait (from the bundled standard executors).
  6. Default Params: set the type to Wait Executor Params and Override Duration = 2.0.
  7. Cost Strategy: choose Constant and set Cost = 1.0.

  8. Duplicate the asset, name it DA_Action_HuntFish:

  9. Preconditions: Bool Fact EqualsNearLake = true.

  10. Effects: Set Bool FactHasFood = true.
  11. Executor Class: Wait, Override Duration = 5.0.
  12. Cost Strategy: Constant, Cost = 5.0.

The planner will prefer Forage whenever NearTree is true because it's cheaper, falling back to HuntFish when only NearLake is true.

Step 3 — Author a goal

  1. Right-click → Miscellaneous → Data Asset → IntentGoal. Name it DA_Goal_Eat.
  2. Desired State: one row, Bool Fact EqualsHasFood = true.
  3. Considerations: Goal Consideration: Constant, Value = 1.0.
  4. Priority: 1.0.

Step 4 — Bundle into an archetype

  1. Right-click → Miscellaneous → Data Asset → IntentArchetypeAsset. Name it DA_Archetype_Forager.
  2. Schema: DA_Schema_Forager.
  3. Goals: add DA_Goal_Eat.
  4. Actions: add DA_Action_Forage and DA_Action_HuntFish.

Step 5 — Put the component on a pawn

  1. Open any pawn Blueprint (a basic AI character will do).
  2. Add Component → IntentForge Component.
  3. In the component's Details panel:
  4. Archetype: DA_Archetype_Forager.
  5. Leave Replan Safety Net Interval, Min Action Commit Time, and Goal Momentum Bonus at defaults.

Step 6 — Wire StateTree execution

  1. Create a new StateTree asset, schema StateTreeComponentSchema. Name it ST_Forager.
  2. Add a state called RunIntentForge.
  3. Add the Run Action (IntentForge) task to that state. The task has one external data slot — point it at your pawn's IntentForgeComponent (the editor surfaces this in the task's details).
  4. Set the state as Root.
  5. Add a StateTree Component to your pawn Blueprint and assign ST_Forager as its StateTree.

Step 7 — Sense the world

The simplest way to set facts is to call SetFactBool on the component from Blueprint. For the tutorial, just hardcode NearTree = true in BeginPlay so the agent always plans to forage.

BeginPlay
   ├─ Get IntentForge Component
   └─ Set Fact Bool ("NearTree", true)

In a real game this would come from AIPerception, overlap events, or distance checks against world POIs.

Step 8 — Run it

  1. Drop the pawn in a level.
  2. Hit Play.
  3. Open the Gameplay Debugger (apostrophe key by default), select the pawn, and find the IntentForge category. You should see:
Archetype: DA_Archetype_Forager
Goal: DA_Goal_Eat  (cost 1.00)
Plan:
  -> [0] DA_Action_Forage
World State (v=2):
  HasFood = false
  NearTree = true
  NearLake = false
  1. After ~2 seconds the Wait executor completes, the planner re-evaluates, sees HasFood = true, and the plan goes empty (goal satisfied).

You've shipped your first plan. Read the Cookbook for patterns that build on this baseline.

What just happened, in 5 bullets

  • The component asked the planner for a plan toward Eat.
  • The planner enumerated actions whose preconditions held, found Forage cheaper than HuntFish, and returned a 1-step plan.
  • The StateTree task spawned a UWaitExecutor, called EnterAction, and ticked it until the 2 s timer elapsed.
  • The component applied the action's effects (HasFood = true) to its world state and tried to plan again.
  • The new plan was empty because the goal was already satisfied.