Optional id: string | AgentIdProtected _positionCurrent position in environment
Protected connectionsOutgoing connections to other agents
Readonly createdCreation timestamp
Readonly idUnique identifier for this agent
Protected incomingIncoming connections from other agents (for efficient lookup)
Protected influenceNetwork influence value
Protected lastLast update timestamp
Protected propertiesAgent properties with type-safe access
Protected stateCurrent agent state
Protected trustTrust values for other agents
Static prefixedGet current agent state
Add incoming connection reference
Private calculateCreate connection to another agent
Private decayRemove connection to another agent
Calculate distance to another position
Calculate distance to another agent
Private emitEmit connection event
Private findGet all connections
Get all properties as readonly record
Get connection to specific agent
Get connections of specific type
Calculate network statistics
Get all agent properties as an object
Get agent property with type safety
Get strong connections (strength > 0.7)
Get trust level for another agent
Get weak connections (strength <= 0.3)
Check if agent is at a specific position
Check if connected to another agent
Check if agent is within a certain distance of a position
Check if agent is within a certain distance of another agent
Simple position update with validation
Remove incoming connection reference
Set position with validation and event emission
Set agent property with validation and event emission
Set trust level for another agent
Strengthen connection through interaction
Update connection strength
Private updateProtected validateProtected validateValidate position before setting Override in subclasses for custom validation
Protected validateValidate property value before setting Override in subclasses for custom validation
Weaken connection
NetworkAgent - Agent with social network capabilities
Features:
Educational Context: Represents community members who form social networks, influence relationships, and participate in information sharing and collective behaviors.