Package akka.javasdk.agent.autonomous
Class AutonomousAgent
Object
akka.javasdk.agent.autonomous.AutonomousAgent
- All Implemented Interfaces:
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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordToken usage statistics for an autonomous agent. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final AgentDefinitiondefine()Start building an agent definition.abstract AgentDefinitionDefine this autonomous agent.
-
Constructor Details
-
AutonomousAgent
public AutonomousAgent()
-
-
Method Details
-
definition
Define this autonomous agent. The definition configures the agent's tools, model provider, guardrails, capabilities, and optional instructions.- Returns:
- the agent definition
-
define
Start building an agent definition.
-