Agent walkGraph convenience overload;

This commit is contained in:
extio-de
2025-06-23 12:42:40 +02:00
parent 8aee0acb15
commit 1ab2340714

View File

@@ -45,6 +45,15 @@ public class AgentExecutorService implements InitializingBean, DisposableBean {
this.agentExecutorService.close(); this.agentExecutorService.close();
} }
public List<AgentContext> walkGraph(final String firstAgent, final AgentContext context) {
final var agent = context.getAgents().get(firstAgent);
if (agent == null) {
throw new IllegalArgumentException("Agent not found: " + firstAgent);
}
LOGGER.debug("Starting agent: {}", agent.name());
return this.walkGraph(agent, context);
}
public List<AgentContext> walkGraph(final BaseAgent agent, final AgentContext context) { public List<AgentContext> walkGraph(final BaseAgent agent, final AgentContext context) {
LOGGER.debug("Agent: {}", agent.name()); LOGGER.debug("Agent: {}", agent.name());