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¶
- Navigate to Teams in the sidebar
- Click Create Team
- Fill in the team details:
- Name: Descriptive team name
- Slug: URL-friendly identifier (auto-generated)
- 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¶
- Open your team's detail page
- Click Add Deployment
- Select an Agent Type
- Set the desired replica count
- 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 collaborate using collaboration tools. Agents route by agent type slug, and the load balancer automatically selects the best available agent.
Collaboration Tools¶
| Tool | Purpose |
|---|---|
assign_task | Delegate a task to another agent type |
ask_expert | Ask a question to an expert agent |
complete | Signal task completion |
notify | Send one-way notification |
notify_all | Broadcast to all teammates |
Example: Assigning a Task¶
# Agent tool: assign_task
# Routes to best available agent of the specified type
result = assign_task(
to_agent_type="code-reviewer",
task="Review the authentication implementation in auth.py"
)
# Returns: {"status": "assigned", "target_agent": "reviewer-1", "relay_id": "..."}
Communication Flow¶
Agent A Backend Agent B
│ │ │
│ assign_task() │ │
├─────────────────────────►│ │
│ │ Validate team membership │
│ │ Load balancer selects B │
│ │ Publish to Redis │
│ ├─────────────────────────►│
│ │ │ Process
│ │ │ complete()
│ │◄─────────────────────────┤
│ │ Forward via relay │
│◄─────────────────────────┤ │
│ │ │
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¶
- Register MCP server in Integrations
- Open your team's settings
- Attach the MCP server
- 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 API Endpoints¶
List Teams¶
Get Team Details¶
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