Package com.tnsai.actions.executors


package com.tnsai.actions.executors
Specialized action executors for different execution contexts.

This package contains executor implementations that handle specific types of actions beyond simple method invocation.

Available Executors

ExecutorPurposeUse Case
WebServiceExecutorHTTP API callsREST APIs, webhooks
LLMRoleExecutorLLM dispatchLLM-typed actions; tool calls resolved by the agent's ToolMethodDispatcher
McpToolExecutorMCP protocol toolsExternal 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: