# Class AgentExecutor

java.lang.Object
com.google.adk.a2a.executor.AgentExecutor

All Implemented Interfaces:
  `io.a2a.server.agentexecution.AgentExecutor`

public class AgentExecutor extends Object implements io.a2a.server.agentexecution.AgentExecutor
Implementation of the A2A AgentExecutor interface that uses ADK to execute agent tasks.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static class`
  `AgentExecutor.Builder`
  Builder for `AgentExecutor`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `cancel(io.a2a.server.agentexecution.RequestContext ctx, io.a2a.server.events.EventQueue eventQueue)`
  `void`
  `execute(io.a2a.server.agentexecution.RequestContext ctx, io.a2a.server.events.EventQueue eventQueue)`

  ### Methods inherited from class Object

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

- ## Method Details

  - ### cancel

    public void cancel(io.a2a.server.agentexecution.RequestContext ctx, io.a2a.server.events.EventQueue eventQueue)
    Specified by:
      `cancel` in interface `io.a2a.server.agentexecution.AgentExecutor`

  - ### execute

    public void execute(io.a2a.server.agentexecution.RequestContext ctx, io.a2a.server.events.EventQueue eventQueue)
    Specified by:
      `execute` in interface `io.a2a.server.agentexecution.AgentExecutor`