# Class ExecutionController

java.lang.Object
com.google.adk.web.controller.ExecutionController

@RestController public class ExecutionController extends Object
Controller handling agent execution endpoints.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ExecutionController(RunnerService runnerService)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `List<Event>`
  `agentRun(AgentRunRequest request)`
  Executes a non-streaming agent run for a given session and message.
  `org.springframework.web.servlet.mvc.method.annotation.SseEmitter`
  `agentRunSse(AgentRunRequest request)`
  Executes an agent run and streams the resulting events using Server-Sent Events (SSE).

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ExecutionController

    @Autowired public ExecutionController(RunnerService runnerService)

- ## Method Details

  - ### agentRun

    @PostMapping("/run") public List<Event> agentRun(@RequestBody AgentRunRequest request)
    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).
    Parameters:
      `request` - The AgentRunRequest containing run details.
    Returns:
      A Flux that will stream events to the client.