Package com.embabel.agent.spi.loop
Interface ToolLoop
-
- All Implemented Interfaces:
public interface ToolLoopEmbabel's own tool execution loop.
This gives us full control over:
Message capture and history management
Dynamic tool injection via strategies
Observability and event emission
This interface is framework-agnostic - implementations use LlmMessageSender for LLM communication, allowing different backends (Spring AI, LangChain4j, etc.) to be plugged in, as well as direct LLM access.
-
-
Method Summary
-
-
Method Detail
-
execute
abstract <O extends Any> ToolLoopResult<O> execute(List<Message> initialMessages, List<Tool> initialTools, Function1<String, O> outputParser)
Execute a conversation with tool calling until completion.
- Parameters:
initialMessages- The starting messages (system + user)initialTools- The initially available toolsoutputParser- Function to parse the final response to the output type- Returns:
The result containing parsed output and conversation history
-
-
-
-