⚠️ IMPORTANT: All features are experimental, under active development. Use at your own risk. Customization to your workflow required. © 2026 GLG, a.s. | ← Back to Index

9. Team Setup & Multi-Agent Workflows (Team+)

This section explains how to build a team of AI assistants, assign roles, coordinate work, and use multi-agent creative workflows.

9.1 Team Architecture

A UAML team consists of agents with defined roles, a leadership hierarchy, and shared knowledge through Federation.

┌─────────────────────────────────────────────────┐
│                  Human (Owner)                   │
│          Final decisions, approvals              │
└───────────────────┬─────────────────────────────┘
                    │
┌───────────────────▼─────────────────────────────┐
│            Leader Agent (Coordinator)             │
│   Plans, assigns tasks, reviews, merges results  │
└──┬──────────┬──────────┬───────────┬────────────┘
   │          │          │           │
┌──▼──┐  ┌───▼──┐  ┌───▼───┐  ┌───▼────┐
│Coder│  │Research│ │Marketing│ │Support │
│Agent│  │Agent  │  │Agent   │  │Agent   │
└─────┘  └──────┘  └────────┘  └────────┘

9.2 Setting Up a Team

Step 1: Register agents in Coordination Server

import requests

COORD = "http://localhost:8791"

# Register leader
requests.post(f"{COORD}/agents", json={
    "id": "leader",
    "name": "Team Lead",
    "role": "coordinator",
    "machine": "vps-main",
    "leadership_priority": 1,       # lowest = primary leader
    "leadership_role": "master",
    "capabilities": ["planning", "review", "deployment"]
})

# Register coder
requests.post(f"{COORD}/agents", json={
    "id": "coder",
    "name": "Code Agent",
    "role": "coder",
    "machine": "dev-workstation",
    "leadership_priority": 2,
    "leadership_role": "slave-1",   # deputy if leader goes offline
    "capabilities": ["coding", "testing", "documentation"]
})

# Register researcher
requests.post(f"{COORD}/agents", json={
    "id": "researcher",
    "name": "Research Agent",
    "role": "researcher",
    "machine": "gpu-server",
    "leadership_priority": 3,
    "leadership_role": "slave-2",
    "capabilities": ["research", "analysis", "data-processing"]
})

Step 2: Configure Focus Engine per role

Each agent sees different data based on their role:

# Coder agent — focus on code, architecture, technical decisions
coder_config = {
    "categories": {
        "code": "allow",
        "architecture": "allow",
        "infrastructure": "allow",
        "marketing": "deny",        # coder doesn't need marketing data
        "sales": "deny"
    },
    "min_relevance_score": 0.4,
    "preset": "standard"
}

# Marketing agent — focus on content, SEO, customer data
marketing_config = {
    "categories": {
        "marketing": "allow",
        "sales": "allow",
        "product": "allow",
        "code": "deny",             # marketing doesn't need code details
        "infrastructure": "deny"
    },
    "min_relevance_score": 0.3,
    "preset": "research"            # broader context for creative work
}

Step 3: Enable Federation for knowledge sharing

# In each agent's config.yaml:
sync:
  enabled: true
  node_id: "coder"          # unique per agent
  sync_interval: 300         # sync every 5 minutes
  shared_topics:             # what to share with the team
    - "decisions"
    - "architecture"
    - "requirements"
  private_topics:            # stays local
    - "personal_notes"
    - "work_in_progress"

9.3 Task Assignment Workflow

The standard workflow for task execution:

1. Owner assigns task to Leader
2. Leader plans: what, how, who
3. Leader assigns subtasks to specific agents
4. Agents CLAIM their task (prevents conflicts)
5. Agents execute and report DONE
6. Leader reviews, merges, reports to Owner

Implementation with Coordination API

# Leader assigns task to coder
requests.post(f"{COORD}/events", json={
    "event_type": "ASSIGN",
    "agent_id": "leader",
    "target_agent": "coder",
    "scope": "feature/new-api",
    "reason": "Implement REST endpoint for /v2/recall"
})

# Coder claims the work
requests.post(f"{COORD}/events", json={
    "event_type": "CLAIM",
    "agent_id": "coder",
    "scope": "feature/new-api",
    "reason": "Working on /v2/recall endpoint"
})

# Coder finishes and reports
requests.post(f"{COORD}/events", json={
    "event_type": "RELEASE",
    "agent_id": "coder",
    "scope": "feature/new-api",
    "reason": "DONE — endpoint implemented, 12 tests pass"
})

9.4 Creative / Proposal Mode

For tasks requiring creativity or multiple perspectives, use the proposal workflow:

1. Owner describes the challenge
2. Leader broadcasts to all relevant agents: "Submit proposals"
3. Each agent independently creates a proposal
   (using their own knowledge, perspective, and Focus Engine config)
4. Leader collects all proposals
5. Leader presents a summary comparison to Owner
6. Owner + Leader select the best approach (or combine elements)
7. Leader assigns implementation based on the chosen proposal

Example: Website Redesign

# Leader broadcasts proposal request
for agent in ["coder", "researcher", "marketing"]:
    requests.post(f"{COORD}/events", json={
        "event_type": "ASSIGN",
        "agent_id": "leader",
        "target_agent": agent,
        "scope": "proposal/website-redesign",
        "reason": "Submit redesign proposal — focus on your expertise area. "
                  "Include: approach, estimated effort, key benefits."
    })

# Each agent stores their proposal in shared memory:
uaml.learn(
    content="Proposal: Redesign with component-based architecture...",
    topic="proposal/website-redesign",
    source_type="proposal",
    confidence=0.9
)

# Leader recalls all proposals:
proposals = uaml.search(
    query="proposal/website-redesign",
    topic="proposal/website-redesign"
)

# Leader summarizes for owner:
summary = f"""
3 proposals received:

1. **Coder**: Component-based architecture, React frontend, 2 weeks
2. **Researcher**: Data-driven layout based on user analytics, 1 week  
3. **Marketing**: Conversion-optimized design with A/B testing, 3 weeks

Recommendation: Combine Coder's architecture with Marketing's
conversion optimization. Estimated 2.5 weeks.
"""

9.5 Role Templates

Pre-built role configurations for common team structures:

Role Focus Categories Preset Capabilities
Coordinator all (read), decisions (write) standard planning, review, deployment
Coder code, architecture, infrastructure standard coding, testing, documentation
Researcher research, analysis, market research research, data-processing, analysis
Marketing marketing, sales, content research content, SEO, analytics
Support product, customers, issues conservative support, triage, escalation

9.6 Leadership Failover

If the leader goes offline, the next agent in the priority chain automatically becomes acting leader:

# Check who is currently leading
response = requests.get(f"{COORD}/leader")
leader = response.json()
# {"id": "leader", "name": "Team Lead", "status": "online", ...}

# If leader goes offline → automatic failover:
# leader(1) → coder(2) → researcher(3) → marketing(4)

9.7 HALT — Emergency Stop

Any team member (or the owner) can halt an agent:

# Owner stops all agents
requests.post(f"{COORD}/halt", json={
    "target": "*",
    "reason": "Strategy change — stop all work until new briefing"
})

# Leader stops one agent
requests.post(f"{COORD}/halt", json={
    "target": "marketing",
    "reason": "Web server maintenance — no edits for 1 hour"
})

HALTs are forwarded to the target agent's webhook and processed immediately.

9.8 Anti-Patterns to Avoid

❌ Don't ✅ Do Instead
Let agents edit the same file simultaneously One owner per file, coordinate via CLAIM
Let agents respond to the same question Leader assigns, others wait
Skip the proposal phase on creative tasks Always collect proposals first
Give all agents access to all data Configure Focus Engine per role
Use expensive cloud models for all agents Use local models for routine work, cloud for complex tasks
Let agents run without a leader Always have a coordination hierarchy