Class AutonomousAgent

Object
akka.javasdk.agent.autonomous.AutonomousAgent
All Implemented Interfaces:
AgentDelegationWorker

public abstract class AutonomousAgent extends Object implements AgentDelegationWorker
An autonomous AI agent component that operates independently to complete tasks.

Unlike a request-based Agent, an autonomous agent runs a durable execution loop: call LLM, execute tools, check task status, repeat — until the task is complete or the iteration limit is reached.

Subclasses must implement definition() to configure the agent's tools, model provider, capabilities, and optional instructions.

Component Identification: The agent must be annotated with Component providing a unique id and a non-empty description. The description captures the agent's purpose and expected outcome: it is injected into the model's system message and used by other agents when choosing a delegation or handoff target.

See Also:
  • Constructor Details

    • AutonomousAgent

      public AutonomousAgent()
  • Method Details

    • definition

      public abstract AgentDefinition definition()
      Define this autonomous agent. The definition configures the agent's tools, model provider, guardrails, capabilities, and optional instructions.
      Returns:
      the agent definition
    • define

      protected final AgentDefinition define()
      Start building an agent definition.