Package com.tnsai.models


package com.tnsai.models
Data models for the TnsAI framework.

This package contains the core data structures used throughout TnsAI, organized into three main sub-packages:

Sub-packages

PackageContentsArchitecture
com.tnsai.models.agentBelief, Desire, Intention, Plan, CapabilityBDI
com.tnsai.models.roleRoleIdentity, CoreDuty, SafetyPropertyGaia
com.tnsai.models.chatChatMessage, ToolCall, ToolResultLLM

Design Principles

  • Immutability: All model classes are immutable for thread safety
  • JSON Support: Jackson annotations enable serialization/deserialization
  • Validation: Constructors validate required fields
  • Lombok: @Getter, @EqualsAndHashCode, @ToString reduce boilerplate

Model Categories

BDI Models (com.tnsai.models.agent)

Represent the mental states of agents:

 Belief   - What the agent knows/believes about the world
 Desire   - What the agent wants to achieve (goals)
 Intention - What the agent has committed to doing
 Plan     - Strategies for achieving intentions
 Capability - Skills and abilities the agent possesses
 

Gaia Models (com.tnsai.models.role)

Define organizational structure and responsibilities:

 RoleIdentity    - Name, goal, and domain of a role
 CoreDuty        - Tasks the role must perform (liveness)
 SafetyProperty  - Constraints the role must maintain (safety)
 Responsibilities - Collection of duties and safety properties
 

Chat Models (com.tnsai.models.chat)

Handle LLM communication:

 ChatMessage  - Messages in conversation (user, assistant, system, tool)
 ToolCall     - Function calls requested by LLM
 ToolResult   - Results of executed tool calls
 
See Also: