Skip to content

Teams

Teams are organizational units that group agents together, enabling collaboration, load balancing, and hierarchical communication.

What is a Team?

A Team in AG2Trust:

  • Groups related agents together
  • Enables agent-to-agent communication
  • Manages deployments (auto-scaled agent pools)
  • Defines collaboration boundaries

Team Architecture

┌─────────────────────────────────────────────────────────┐
│                       Team                               │
│  ┌─────────────────────────────────────────────────┐   │
│  │              Deployments                         │   │
│  │  ┌─────────────┐  ┌─────────────┐              │   │
│  │  │ Support     │  │ Research    │              │   │
│  │  │ (3 replicas)│  │ (2 replicas)│              │   │
│  │  └─────────────┘  └─────────────┘              │   │
│  └─────────────────────────────────────────────────┘   │
│  ┌─────────────────────────────────────────────────┐   │
│  │              Agent Communication                 │   │
│  │  Support-1 ←→ Support-2 ←→ Research-1           │   │
│  └─────────────────────────────────────────────────┘   │
│  ┌─────────────────────────────────────────────────┐   │
│  │              MCP Integrations                    │   │
│  │  GitHub, Jira, Slack                            │   │
│  └─────────────────────────────────────────────────┘   │
└─────────────────────────────────────────────────────────┘

Creating a Team

Via Dashboard

  1. Navigate to Teams in the sidebar
  2. Click Create Team
  3. Fill in the team details:
  4. Name: Descriptive team name
  5. Slug: URL-friendly identifier (auto-generated)
  6. Description: Team purpose

Team Configuration

Field Required Description
Name Yes Display name for the team
Slug Yes URL-friendly identifier
Description No Team purpose and notes

Deployments

Deployments define how many agents of each type run within a team.

Creating a Deployment

  1. Open your team's detail page
  2. Click Add Deployment
  3. Select an Agent Type
  4. Set the desired replica count
  5. Click Deploy

Deployment Properties

Property Description
Agent Type The template for agents in this deployment
Desired Replicas Target number of running agents
Actual Replicas Current running agent count
Status Deployment health status

Auto-Reconciliation

AG2Trust automatically maintains your desired replica count:

graph LR
    A[Desired: 3] --> B{Actual?}
    B -->|2| C[Start 1 agent]
    B -->|4| D[Stop 1 agent]
    B -->|3| E[No action]

The reconciliation loop runs every 60 seconds.

Agent Communication

Agents within a team can discover and communicate with each other.

Discovering Agents

# Agent tool: discover_agent
# Returns list of agents in the same team

agents = discover_agent(role="researcher")
# Returns: [{"id": "agent-1", "name": "Research Assistant", ...}]

Sending Messages

# Agent tool: send_agent_message
# Send message to another agent in the team

response = send_agent_message(
    target_agent_id="agent-2",
    message="Please analyze this data: ..."
)

Communication Flow

Agent A                    Backend                    Agent B
   │                          │                          │
   │ send_agent_message()     │                          │
   ├─────────────────────────►│                          │
   │                          │ Validate team membership │
   │                          │ Publish to Redis         │
   │                          ├─────────────────────────►│
   │                          │                          │ Process
   │                          │◄─────────────────────────┤
   │                          │ Forward response         │
   │◄─────────────────────────┤                          │
   │                          │                          │

Rate Limits

Operation Limit
Agent-to-agent messages 20/minute per agent

MCP Integrations

Teams can be granted access to MCP (Model Context Protocol) servers for external tool access.

Assigning MCP Servers

  1. Register MCP server in Integrations
  2. Open your team's settings
  3. Attach the MCP server
  4. Grant specific agent types access

Access Model

MCP Server (registered in Integrations)
    └── Assigned to Team(s)
        └── Agent Types granted access within team

Agents can then use call_mcp() to invoke tools from assigned servers.

Team Limits

Resource Limit
Teams per organization 3
Agents per team 20
MCP servers per team 10

Best Practices

1. Organize by Function

# Good: Clear functional boundaries
Team: Customer Support
  └── Deployments: tier1-support (3), escalation (1)

Team: Engineering
  └── Deployments: code-review (2), devops (1)

# Avoid: Mixed purposes
Team: Everything
  └── All agent types mixed together

2. Right-Size Deployments

Traffic Level Recommended Replicas
Development 1
Low traffic 1-2
Medium traffic 2-3
High traffic 3-5

3. Monitor Deployment Health

Check the Teams dashboard for: - Replica status (desired vs actual) - Agent health indicators - Communication patterns

4. Use Meaningful Slugs

Team slugs appear in agent names:

Team slug: support
Agent Type slug: tier1
Result: support-tier1-1, support-tier1-2, ...

Team API Endpoints

List Teams

GET /api/teams

Get Team Details

GET /api/teams/{team_id}

Create Deployment

POST /api/teams/{team_id}/deployments
Content-Type: application/json

{
  "agent_type_id": "uuid",
  "desired_replicas": 3
}

Scale Deployment

PATCH /api/teams/{team_id}/deployments/{deployment_id}
Content-Type: application/json

{
  "desired_replicas": 5
}

Use Cases

Customer Support Tiers

Team: Support
├── Deployment: general-support (5 replicas)
│   └── Handles initial customer inquiries
├── Deployment: technical-support (3 replicas)
│   └── Handles technical issues
└── Deployment: escalation (1 replica)
    └── Handles complex cases, can message other agents

Research Pipeline

Team: Research
├── Deployment: data-collector (2 replicas)
│   └── Gathers information from web
├── Deployment: analyzer (2 replicas)
│   └── Analyzes collected data
└── Deployment: report-writer (1 replica)
    └── Compiles findings into reports

DevOps Automation

Team: DevOps
├── Deployment: monitor (1 replica)
│   └── Watches for issues
├── Deployment: diagnostics (2 replicas)
│   └── Investigates problems
└── Deployment: remediation (1 replica)
    └── Applies fixes (with approval)