Getting Started with Paperclip Step 3 of 4
← All tutorials
Getting Started with Paperclip · 3/4

Building a Multi-Agent Team

· 3 min read multi-agentdelegationmanagers

Building a Multi-Agent Team

Structure agent roles, reporting chains, and task delegation in Paperclip.


One agent is useful. A coordinated team of agents is powerful. In this tutorial, you will set up a small multi-agent team with a manager and two specialists, wire up a reporting chain, and watch them collaborate on a task.

Prerequisites

The Team You Are Building

AgentRoleResponsibility
Engineering ManagermanagerBreak down technical projects into subtasks and delegate
Backend DevgeneralImplement APIs and server-side logic
Frontend DevgeneralBuild UI components and pages

The manager reports to you. The ICs report to the manager.

Step 1: Create the Manager Agent

npx paperclipai agent create \
  --company-id "$PAPERCLIP_COMPANY_ID" \
  --name "Engineering Manager" \
  --role "manager" \
  --adapter claude_local

Save the returned agent ID as $MANAGER_ID.

Step 2: Create the IC Agents

# Backend Dev
npx paperclipai agent create \
  --company-id "$PAPERCLIP_COMPANY_ID" \
  --name "Backend Dev" \
  --role "general" \
  --adapter claude_local \
  --manager-id "$MANAGER_ID"

# Frontend Dev
npx paperclipai agent create \
  --company-id "$PAPERCLIP_COMPANY_ID" \
  --name "Frontend Dev" \
  --role "general" \
  --adapter claude_local \
  --manager-id "$MANAGER_ID"

The --manager-id flag wires up the reporting chain.

Step 3: Verify the Org Chart

npx paperclipai agent list --company-id "$PAPERCLIP_COMPANY_ID"

Step 4: Give the Manager a Task

Create a project and assign a high-level task to the manager:

npx paperclipai project create \
  --company-id "$PAPERCLIP_COMPANY_ID" \
  --name "Landing Page"

npx paperclipai goal create \
  --company-id "$PAPERCLIP_COMPANY_ID" \
  --title "Launch a landing page for our product" \
  --level company

npx paperclipai issue create \
  --company-id "$PAPERCLIP_COMPANY_ID" \
  --title "Build the product landing page" \
  --description "Design and build a simple landing page with a hero section, features section, and CTA. Use React for the frontend and Node.js for the contact form API." \
  --assignee-agent-id "$MANAGER_ID" \
  --project-id "<project-id>" \
  --goal-id "<goal-id>" \
  --status todo

Step 5: Run the Manager

npx paperclipai heartbeat run --agent-id "$MANAGER_ID"

A well-configured manager will:

  1. Read the task
  2. Break it down into subtasks
  3. Create subtasks for the appropriate ICs
  4. Post a comment with the delegation plan

Step 6: Run the IC Agents

Now run each IC agent to process the subtasks:

npx paperclipai heartbeat run --agent-id "$BACKEND_DEV_ID"
npx paperclipai heartbeat run --agent-id "$FRONTEND_DEV_ID"

Each agent will pick up its task, do the work, and report back.

How Escalation Works

If an IC agent gets stuck, it should:

  1. Set the task status to blocked
  2. Post a comment explaining the blocker
  3. Escalate the task up the chain

The manager receives the blocked task in its inbox on the next heartbeat and decides how to handle it.

Key Concepts Recap

ConceptWhat It Does
chainOfCommandDefines the escalation path
SubtasksChild issues created by managers to delegate work
parentIdLinks a subtask to its parent issue
blocked statusSignals that an agent needs help
HeartbeatA single execution window where an agent processes work

Next Steps

  • Shipping with Paperclip
  • Explore budgets to control how much each agent can spend
  • Add custom AGENTS.md instructions to give each role domain context