Package com.tnsai.actions.executors
This package contains executor implementations that handle specific types of actions beyond simple method invocation.
Available Executors
| Executor | Purpose | Use Case |
|---|---|---|
WebServiceExecutor | HTTP API calls | REST APIs, webhooks |
LLMRoleExecutor | LLM dispatch | LLM-typed actions; tool calls
resolved by the agent's ToolMethodDispatcher |
McpToolExecutor | MCP protocol tools | External tool servers |
WebServiceExecutor
Executes HTTP requests configured via @WebService on an
@ActionSpec(type = WEB_SERVICE) action. Supports auth, retry,
custom headers, and timeout configuration.
LLMRoleExecutor
Builds a chat request from an LLM-typed action's description and
parameters, applies the optional llmSystemPrompt /
llmTemperature overrides declared on @ActionSpec,
and delegates to the agent's LLMClient. A missing
client fails as ActionExecutionException so @Fallback
and liability recording can see the error; it does not return
null. Tool exposure is configured at the agent level via
AgentBuilder.builtInTools(...) / .toolPojos(...);
any @Tool method calls the model emits are resolved by
ToolMethodDispatcher.
McpToolExecutor
Dispatches calls to remote tools exposed via the Model Context
Protocol, using the configuration declared on @MCPTool.
Error Handling
All executors provide consistent error handling:
- Timeouts are configurable per action
- Retries with exponential backoff (where supported)
- Failures are surfaced as
ActionExecutionException
- See Also:
-
ClassDescriptionExecutor for
LLM-typed actions.Executor for MCP_TOOL actions.Interface for type-specific action executors.Executor for WEB_SERVICE actions.