An AI agent is a software system that receives a goal, gathers or interprets information, takes actions through external systems, and adapts its behavior to pursue the goal. In testing, it extends LLM assistance into focused tasks such as reading and creating test data. section 9.0 section 9.1.1
A useful agent is characterized by four behaviors:
- Goal-driven: accepts a specific or abstract objective that provides a basis for evaluating progress. section 9.1.1
- Perceptive: extracts information or interacts with external systems through APIs, automation, or other tools. section 9.1.1
- Autonomous: chooses which tasks to perform and in what order instead of following only a fixed algorithmic path. section 9.1.1
- Adaptive: reacts to retrieved information or failure rather than blindly repeating an unsuccessful action. section 9.1.1
LLM-based agents commonly use function calling: prompts and callable code are grouped into tools, allowing the model to select methods, pass extracted parameters, and reuse returned data. LangChain4J can connect LLM platforms with such tools through @Tool and @P annotations. section 9.4 section 9.2
Test data assistant
Give an agent instructions to read and create test data. The agent can invoke tools, feed returned data into later calls, and produce a response for the testing task. This demonstrates a focused extension of prompt engineering rather than a general-purpose autonomous tester. section 9.2 section 9.3
Figure 9.2 An AI agent connected to multiple data sources
A multi-source agent can select relevant documentation, project information, monitoring data, or analytics data before improving an LLM response. section 9.3.1
Agents remain difficult to trust because LLM decisions are opaque and indeterministic: tools may run unexpectedly, outputs may vary, and failures can be hard to diagnose. Guard rails, validation, extensive testing, and human judgment remain necessary. section 9.3.2 section 9.4
































