Package com.tnsai.models.agent
Class Plan
java.lang.Object
com.tnsai.models.agent.Plan
Represents a strategic plan or approach within the BDI architecture.
In BDI (Belief-Desire-Intention) systems, a Plan is a recipe or procedure that an agent can execute to achieve a particular goal. Plans bridge the gap between desires (what the agent wants) and actions (what the agent does).
BDI Context
- Beliefs: What the agent knows about the world
- Desires: What the agent wants to achieve (goals)
- Intentions: The desires the agent has committed to pursuing
- Plans: The strategies/procedures to fulfill intentions
Plan Components
| Field | Purpose | Example |
|---|---|---|
| name | Identifier for the plan | "Customer Support Escalation" |
| description | What the plan achieves | "Handle complex customer issues" |
| approach | How to execute the plan | "Gather info, analyze, escalate if needed" |
Usage Example
// Simple plan
Plan searchPlan = new Plan(
"Web Search",
"Find information on the internet",
"Use search API, filter results, summarize findings"
);
// In an Agent definition
public class ResearchAgent extends Agent {
@Override
protected List<Plan> getPlans() {
return List.of(
new Plan("Deep Research",
"Comprehensive topic investigation",
"1. Search multiple sources\n" +
"2. Cross-reference information\n" +
"3. Synthesize findings\n" +
"4. Generate report"),
new Plan("Quick Lookup",
"Fast fact checking",
"Search authoritative sources, verify, respond")
);
}
}
Thread Safety
This class is immutable and therefore thread-safe.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Plan
-