Interface AgentLocalExecutor

All Known Implementing Classes:
DefaultAgentExecutor

public interface AgentLocalExecutor
Local executor seam for AgentsService.

Mirrors the TS AgentExecutor entry surface (LLM provider stack, tool routing, memory, streaming, human-in-the-loop) without forcing the Java SDK to ship a built-in LLM runtime. When a user provides their own implementation via AgentsService.setLocalExecutor(AgentLocalExecutor), AgentsService.run(Map) delegates to it instead of throwing a configuration error. AgentsService owns agent definition lookup, tool registry resolution, and (eventually) cache/log envelopes; the executor only owns the LLM/tool dispatch loop.

This matches the parity strategy used for FeatureService#executeLocal / FeatureLocalExecutor.

  • Method Summary

    Modifier and Type
    Method
    Description
    Run the agent loop end-to-end.
    default boolean
    Optional probe used by AgentsService to skip local execution when the executor cannot run a particular agent (unsupported model provider, missing tool handlers, etc.).
  • Method Details

    • run

      Run the agent loop end-to-end.

      Return shape SHOULD mirror TS IAgentRunResult: success, data, messages, tool_calls, usage, error, execution_time.

    • supports

      default boolean supports(AgentExecutionContext context)
      Optional probe used by AgentsService to skip local execution when the executor cannot run a particular agent (unsupported model provider, missing tool handlers, etc.). Defaults to true.