Goals: Defining Agent Objectives
Table of Contents
Goals are clear, measurable objectives that guide agent execution. A well-defined goal tells the agent what to accomplish, not how to do it.
What Makes a Good Goal?
A good goal is:
-
Clear - Unambiguous about what success looks like
-
Specific - Provides enough context to guide execution
-
Measurable - Has clear criteria for completion
-
Achievable - Within the agent’s capabilities
Examples
Goal-Driven Execution
In Spring AI Agents, goals are specified using the AgentClient
API:
AgentClientResponse response = agentClient
.goal("Increase JaCoCo test coverage to 80% for the Judge API")
.workingDirectory(projectRoot)
.run();
The agent autonomously determines the steps needed to achieve the goal.
Next Steps
-
Context Engineering - Providing information to agents
-
Judges - Verifying goals were achieved
-
CLI Agents - Understanding autonomous agents
-
Getting Started - Build your first agent