· 4 Min read

Walkthrough: Creating a Multi-Agent Tool with Project Templates

Walkthrough: Creating a Multi-Agent Tool with Project Templates

This tutorial requires openagents version 0.8.5.post4 or higher

This walkthrough teaches you how to build a coordinated multi-agent workflow that exposes a tool via MCP. We'll use an "Alternative Service Finder" as our example - a system where multiple agents work together to find and compare alternatives to web services.

By the end, you'll be able to ask Claude:

"Find alternatives to Notion and compare them"

And get a detailed comparison from your multi-agent system!

What You'll Learn

  • How to use project templates to define reusable workflows
  • How to expose tools via MCP for external access
  • How coordinator agents orchestrate multi-agent workflows
  • How to connect Claude Desktop to your agent network

Architecture Overview

demo08

Step 1: Set Up Your Python Environment

First, ensure you have Python 3.10 or higher installed.

# Check your Python version
python --version

If you need to install Python, visit python.org or use your system's package manager.

Step 2: Install OpenAgents

Install the OpenAgents package from PyPI:

pip install openagents

Tip: Always upgrade to the latest version to get the newest features and bug fixes:

pip install --upgrade openagents

Step 3: Clone the OpenAgents Repository

Clone the repository to get the demo files:

git clone https://github.com/openagentsinc/openagents.git
cd openagents

Step 4: Understand the Project Template

Before starting the network, let's understand how project templates work. Open demos/08_alternative_service_project/network.yaml to see the template definition:

project_templates:
  find_alternatives:
    name: Find Service Alternatives
    description: Provides users with alternative options to given web services
    expose_as_tool: true
    tool_name: find_service_alternatives
    tool_mode: async
    tool_description: >
      Find and compare alternative services to a given web service or SaaS tool.
      Returns a detailed comparison with features, pricing, and recommendations.
    agent_groups:
      - coordinators
      - workers

Key settings:

  • expose_as_tool: true - Makes this workflow callable as a tool via MCP
  • tool_name - The name external clients will use to call this tool
  • agent_groups - Which agents can participate in this workflow

Step 5: Start the Network

Start the Alternative Service Finder network:

openagents network start demos/08_alternative_service_project

The Studio web interface will automatically open in your browser at http://localhost:8700.

Note: If the browser doesn't open automatically, navigate to http://localhost:8700 manually.

image

Let's enter the admin dashboard by clicking "Manage Network", enter "admin" as the password.

Screenshot 2026-01-09 at 19 19 13

Step 6: Configure the Default Models and Start the Service Agents

The network needs three agents to function, let's first configure the default LLM for running the service agents.

Configure Default Models

In Default Models tab, configure and test the LLM access.

image

Start Service Agents

Let's start all three service agents: searcher, comparer and coordinator in the Service Agents tab.

image

Step 7: Test the Workflow in User Console

Let's verify everything works before connecting Claude Desktop.

Let's click User Console and switch to the Project App. Let's launch a new project and select the Find Service Alternatives project template.

image

We can type "Discord" so that the agent team will work to search for alternative options of Discord.

image

What's happening: The coordinator receives your request, delegates to the searcher to find alternatives, then delegates to the comparer to create a detailed analysis. All communication happens through the OpenAgents network.

Step 9: Publish Your Network

To connect Claude Desktop to your network, you need to publish it.

Publish from Admin Dashboard

  1. In the Admin Dashboard, find the "Network Status" panel
  2. Click "Publish Network"
  3. You can authenticate with OpenAgents for creating publishing the networks
image
  1. Connect via Relay for localhost networks
  2. Publiksh the networks

IMPORTANT: You need to pick an unique network ID

Once published, you'll see the following information if you go to the Dashboard:

  • Network ID: my-service-finder (only as an example, you have to use your only ID)
  • MCP URL: https://network.openagents.org/my-service-finder/mcp

Copy the MCP URL - you'll need it for Claude Desktop.

Screenshot 2026-01-09 at 19 31 50

Step 10: Connect Claude Desktop

Now let's connect Claude Desktop to use your multi-agent tool.

Configure Claude Desktop

Go to Settings > Connectors, let's add a custom connector:

image Screenshot 2026-01-09 at 19 33 39

Let's configure the connector and always allow the find_service_alternatives tool!

Screenshot 2026-01-09 at 19 34 01 Screenshot 2026-01-09 at 19 34 15

Important: Replace service-alternatives-142342 with your actual network ID from the publish step.

Step 11: Use Your Tool with Claude

Open Claude Desktop and try these prompts:

Basic Query

Find alternative services to Slack.

Claude will:

  1. Call the start_find_service_alternatives tool
  2. Your coordinator will orchestrate the searcher and comparer agents
  3. Claude calls get_result_find_service_alternatives receives and presents the detailed comparison
image

More Example Queries

QueryWhat Happens
"What are some alternatives to Mailchimp?"Finds email marketing alternatives
"Compare project management tools like Asana"Finds and compares PM tools
"I need a Figma alternative for my team"Finds design tool alternatives
"What's a good open-source alternative to Notion?"Filters for open-source options

How the Agents Work Together

The Coordinator (Python)

The coordinator is a non-LLM agent that orchestrates the workflow:

@on_event("project.notification.started")
async def on_project_started(self, event):
    # 1. Extract the service name from project goal
    # 2. Delegate to searcher: "Find alternatives to {service}"
    # 3. Wait for searcher to complete
    # 4. Delegate to comparer: "Compare these alternatives"
    # 5. Wait for comparer to complete
    # 6. Mark project as complete

The Searcher Agent (YAML + LLM)

The searcher uses intelligent tool selection:

instructions: |
  DECISION LOGIC:
  1. If the service is well-known (Slack, Notion, etc.) → Use your knowledge
  2. If the service is niche or new → Use the search_web tool
  3. Prefer efficiency: Don't make unnecessary web requests

The Comparer Agent (YAML + LLM)

The comparer also uses intelligent tool selection:

instructions: |
  DECISION LOGIC:
  1. If you know the services well → Use your knowledge
  2. If you need current pricing or features → Use fetch_webpage tool
  3. Always provide a structured comparison table

MCP Tools Available

Once connected, Claude has access to:

ToolDescription
find_service_alternativesTriggers the full workflow to find and compare alternatives

The tool accepts a service name and returns:

  • List of alternative services with URLs
  • Detailed comparison table (features, pricing, pros/cons)
  • Recommendations based on use case

Understanding Project Templates

Project templates are a powerful way to:

  1. Define reusable workflows - Create once, use many times
  2. Expose as tools - Make workflows callable via MCP
  3. Control access - Specify which agent groups participate
  4. Provide context - Give agents background about the workflow
project_templates:
  find_alternatives:
    name: Find Service Alternatives
    description: Provides users with alternative options to given web services
    expose_as_tool: true
    tool_name: find_service_alternatives
    tool_mod: async
    context: |
      This workflow helps users discover alternatives to popular SaaS tools.
      The searcher finds options, the comparer analyzes them in detail.