Package com.tnsai.annotations
Annotation Interface GroupMember
Declares agent group memberships.
Agents can belong to multiple groups for coordination and communication. Capabilities are automatically derived from Role actions.
Usage
@AgentSpec(description = "Code review specialist")
@GroupMember(
groups = {"development-team", "code-reviewers"},
autoJoin = true
)
public class ReviewerAgent extends Agent { ... }
Group Discovery
Groups are discovered at runtime. If a group doesn't exist,
it can be auto-created based on autoCreateGroups setting.
- Author:
- TnsAI Team
- See Also:
-
Required Element Summary
Required Elements -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionbooleanWhether to create groups if they don't exist.booleanWhether to automatically join groups on agent start.intMaximum concurrent tasks from group assignments.intPriority for task assignment within groups.Role within groups (e.g., "leader", "worker", "observer").
-
Element Details
-
groups
String[] groupsGroup IDs this agent belongs to. -
autoJoin
boolean autoJoinWhether to automatically join groups on agent start.- Default:
true
-
autoCreateGroups
boolean autoCreateGroupsWhether to create groups if they don't exist.- Default:
false
-
role
String roleRole within groups (e.g., "leader", "worker", "observer").- Default:
"member"
-
priority
int priorityPriority for task assignment within groups.Higher priority = more likely to receive tasks.
- Default:
5
-
maxConcurrentTasks
int maxConcurrentTasksMaximum concurrent tasks from group assignments.- Default:
1
-