Class Plan

java.lang.Object
com.tnsai.models.agent.Plan

public final class Plan extends Object
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

FieldPurposeExample
nameIdentifier for the plan"Customer Support Escalation"
descriptionWhat the plan achieves"Handle complex customer issues"
approachHow 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 Details