Package com.tnsai.models.agent
Class Capability
java.lang.Object
com.tnsai.models.agent.Capability
Represents a capability or skill that an agent possesses within the BDI architecture.
In BDI (Belief-Desire-Intention) systems, capabilities define what an agent can do - the skills, tools, and abilities available to achieve its goals. Capabilities are distinct from desires (what the agent wants) and intentions (what the agent has committed to doing).
Role in Agent Architecture
- Skill Discovery: Other agents can query capabilities for collaboration
- Task Allocation: Orchestrators assign tasks based on agent capabilities
- Self-Awareness: Agents know their own limitations and strengths
Usage Example
// Using constructor
Capability mathCap = new Capability("Mathematics", "Perform complex calculations");
// Using static factory (recommended for fluent syntax)
import static com.tnsai.models.agent.Capability.capability;
List<Capability> capabilities = List.of(
capability("Data Analysis", "Analyze datasets and extract insights"),
capability("Report Generation", "Create formatted reports"),
capability("API Integration", "Connect to external REST APIs")
);
// In an Agent definition
public class AnalystAgent extends Agent {
@Override
protected List<Capability> getCapabilities() {
return List.of(
capability("Statistical Analysis", "Perform regression, correlation analysis"),
capability("Data Visualization", "Create charts and graphs")
);
}
}
Thread Safety
This class is immutable and therefore thread-safe. All fields are final and set at construction time.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Capabilitycapability(String name, String description) Static factory method for cleaner syntax.
-
Constructor Details
-
Capability
-
-
Method Details
-
capability
Static factory method for cleaner syntax. Example:import static com.tnsai.models.agent.Capability.capability; capability("Mathematical Operations", "Perform calculations")
-