Package com.tnsai.actions.executors
Class LLMRoleExecutor
java.lang.Object
com.tnsai.actions.executors.LLMRoleExecutor
- All Implemented Interfaces:
TypedActionExecutor
Executor for
LLM-typed actions.
Builds a chat request from the action's description + invocation
parameters, applies any per-action llmSystemPrompt and
llmTemperature overrides declared on @ActionSpec, and
delegates to the agent's LLMClient. A missing client throws
ActionExecutionException so @Fallback and liability
recording can see the failure — it does not return null.
The framework's ToolMethodDispatcher resolves any @Tool
method calls the model emits — tool exposure is configured at the
agent level via AgentBuilder.builtInTools(...) /
.toolPojos(...).
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
LLMRoleExecutor
public LLMRoleExecutor()
-
-
Method Details
-
execute
public Object execute(ActionMetadata action, Role role, Map<String, Object> parameters, Map<String, Object> context) Description copied from interface:TypedActionExecutorExecutes an action with the given parameters and context.- Specified by:
executein interfaceTypedActionExecutor- Parameters:
action- The action metadata containing annotation detailsrole- The role instance that contains the methodparameters- The parameters for the action (from message or executeAction call)context- Additional context (e.g., LLM client reference, agent reference)- Returns:
- The execution result
-