langgoap.async_execute_action

langgoap.async_execute_action#

async async_execute_action(action, world_state)[source]#

Resolve and await the best async callable for action.

Resolution priority: 1. action.aexecute — explicit async callable (highest priority) 2. action.execute if it is a coroutine function 3. action.execute run in the default thread-pool executor (sync → async) 4. No callable — returns None; caller applies declared effects

This is a public helper so that advanced callers (e.g. custom executors, test utilities) can reuse the resolution logic without duplicating it.

Parameters:
  • action (ActionSpec)

  • world_state (dict[str, Any])

Return type:

Any