langgoap.successful_action_names

langgoap.successful_action_names#

successful_action_names(result)[source]#

Return names of successfully executed actions from a GOAP result.

Accepts both the typed state returned by GoapGraph.invoke and the raw JSON state of a compiled graph. Replaces the common pattern:

[h.action_name for h in result["execution_history"] if h.success]
Parameters:

result (Mapping[str, Any]) – A GoapState (or compatible dict) containing an execution_history key.

Returns:

List of action names that completed successfully, in execution order.

Return type:

list[str]