Annotation Interface GroupMember


@Documented @Retention(RUNTIME) @Target({}) public @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
    Modifier and Type
    Required Element
    Description
    Group IDs this agent belongs to.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    Whether to create groups if they don't exist.
    boolean
    Whether to automatically join groups on agent start.
    int
    Maximum concurrent tasks from group assignments.
    int
    Priority for task assignment within groups.
    Role within groups (e.g., "leader", "worker", "observer").
  • Element Details

    • groups

      String[] groups
      Group IDs this agent belongs to.
    • autoJoin

      boolean autoJoin
      Whether to automatically join groups on agent start.
      Default:
      true
    • autoCreateGroups

      boolean autoCreateGroups
      Whether to create groups if they don't exist.
      Default:
      false
    • role

      String role
      Role within groups (e.g., "leader", "worker", "observer").
      Default:
      "member"
    • priority

      int priority
      Priority for task assignment within groups.

      Higher priority = more likely to receive tasks.

      Default:
      5
    • maxConcurrentTasks

      int maxConcurrentTasks
      Maximum concurrent tasks from group assignments.
      Default:
      1