import app.phaseo.agent.AgentSdk;
import java.util.List;
import java.util.Map;
var lookup = AgentSdk.defineTool(new AgentSdk.Tool(
"lookup_docs",
(input, context) -> Map.of("article", "Presets keep routing stable."),
"Look up a documentation article",
Map.of("type", "object"),
java.time.Duration.ofSeconds(10)
));
var agent = AgentSdk.createAgent(new AgentSdk.AgentDefinition(
"support-agent",
"openai/gpt-5.4-nano",
null,
"Use tools when useful and answer concisely.",
List.of(lookup),
12,
null,
null,
new AgentSdk.ModelRetryConfig(2, java.time.Duration.ofMillis(250)),
new AgentSdk.ToolExecutionConfig(4)
));
var result = agent.run(new AgentSdk.RunOptions(
"Explain presets",
AgentSdk.createGatewayAgentClient(),
null, null, null, null, null, null,
event -> System.out.println(event.type()),
AgentSdk.createAgentDevtools(".phaseo-devtools")
));