Class ExecutionController
java.lang.Object
com.google.adk.web.controller.ExecutionController
Controller handling agent execution endpoints.
-
Constructor Summary
ConstructorsConstructorDescriptionExecutionController(RunnerService runnerService) Creates a controller that timestamps error events with the system clock. -
Method Summary
Modifier and TypeMethodDescriptionagentRun(AgentRunRequest request) Executes a non-streaming agent run for a given session and message.org.springframework.web.servlet.mvc.method.annotation.SseEmitteragentRunSse(AgentRunRequest request) Executes an agent run and streams the resulting events using Server-Sent Events (SSE).
-
Constructor Details
-
ExecutionController
Creates a controller that timestamps error events with the system clock.
-
-
Method Details
-
agentRun
Executes a non-streaming agent run for a given session and message.- Parameters:
request- The AgentRunRequest containing run details.- Returns:
- A list of events generated during the run.
- Throws:
org.springframework.web.server.ResponseStatusException- if the session is not found or the run fails.
-
agentRunSse
@PostMapping(value="/run_sse", produces="text/event-stream") public org.springframework.web.servlet.mvc.method.annotation.SseEmitter agentRunSse(@RequestBody AgentRunRequest request) Executes an agent run and streams the resulting events using Server-Sent Events (SSE).An unknown session gets 404 before the stream opens; a run that fails ends the stream with a final
errorevent.- Parameters:
request- The AgentRunRequest containing run details.- Returns:
- An SseEmitter that streams the events to the client.
-