---
title: How to Create and Use Toolbelts (public)
description: Group Action Gateway tools into a versioned Toolbelt, then select that version in a session or environment spec.
product: Managed Agents
url: https://docs.digitalocean.com/products/managed-agents/action-gateway/how-to/create-toolbelts/
last_updated: "2026-10-16"
---

> **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](https://docs.digitalocean.com/llms.txt). Markdown versions of pages use the same URL with `index.html.md` in place of the HTML page (for example, append `index.html.md` to the directory path instead of opening the HTML document).

# How to Create and Use Toolbelts (public)

Action Gateway connects applications and AI agents to tools through a managed MCP endpoint or SDK, with the accounts and permissions you choose. See [What You Can Build](https://docs.digitalocean.com/products/managed-agents/action-gateway/details/what-you-can-build/index.html.md) for standalone agent examples.

A Toolbelt is a versioned collection of Action Gateway tools. Select a specific Toolbelt version to reuse its member selection across sessions. Publishing a later Toolbelt version does not change that selection in existing sessions.

Select a Toolbelt when creating an [Action Gateway session](https://docs.digitalocean.com/products/managed-agents/action-gateway/how-to/manage-sessions/index.html.md). For a managed environment spec, see [Connect Action Gateway to Harness Runtime](https://docs.digitalocean.com/products/managed-agents/agent-harness-runtime/how-to/connect-action-gateway/index.html.md).

## Prerequisites

- Access to Action Gateway for your DigitalOcean team.
- A [DigitalOcean personal access token](https://docs.digitalocean.com/reference/api/create-personal-access-token/index.html.md) authorized for Action Gateway if you use the SDK. Keep it in your local `DIGITALOCEAN_TOKEN` environment variable.

Creating a Toolbelt does not run its tools. Some member tools, including Exa web search and web fetch, require a [positive prepaid balance](https://docs.digitalocean.com/products/managed-agents/action-gateway/how-to/manage-ag-prepayment/index.html.md) when you invoke them.

## Create a Toolbelt Using an SDK

Create a Toolbelt containing the search and fetch tools, then select that Toolbelt version in a session. Replace `<actor-id>` with the actor whose provider connections the session should use. The examples print the session’s MCP URL without making a model request or invoking a tool.

### Python

Install PyDo:

```shell
pip install pydo
```

In a local Python interpreter, run:

```python
import os

from pydo.action_gateway import ActionGatewayClient

ag_client = ActionGatewayClient(token=os.environ["DIGITALOCEAN_TOKEN"])

toolbelt = ag_client.create_toolbelt(
    name="search_toolbelt",
    tools=[
        "exa_web_search",
        "exa_web_fetch",
    ],
)

print(toolbelt.ref)

session = ag_client.session.create(
    actor_id="<actor-id>",
    tools=[toolbelt.ref],
    permissions={
        "default_action": "deny",
        "rules": [
            {"tool": "action_search", "action": "allow"},
            {"tool": "action_invoke", "action": "allow"},
            {"tool": toolbelt.ref, "action": "allow"},
        ],
    },
)

print(session.url)
```

### Go

Install Godo:

```shell
go get github.com/digitalocean/godo
```

Create and run a local program with:

```go
package main

import (
	"context"
	"fmt"
	"os"

	"github.com/digitalocean/godo"
)

func main() {
	client := godo.NewFromToken(os.Getenv("DIGITALOCEAN_TOKEN"))
	ctx := context.Background()

	created, _, err := client.ActionGateway.Toolbelts.Create(ctx, &godo.ActionGatewayToolbeltCreateRequest{
		Name:  "search_toolbelt",
		Tools: []string{"exa_web_search", "exa_web_fetch"},
	})
	if err != nil {
		panic(err)
	}

	ref := created.Toolbelt.Reference
	fmt.Println(ref)

	session, _, err := client.ActionGateway.Sessions.CreateRuntime(ctx, &godo.ActionGatewaySessionCreateRequest{
		ActorID: "<actor-id>",
		Tools:   []string{ref},
		Policy: &godo.ActionGatewaySessionPolicy{
			DefaultAction: "deny",
			Rules: []godo.ActionGatewaySessionPolicyRule{
				{Tool: "action_search", Action: "allow"},
				{Tool: "action_invoke", Action: "allow"},
				{Tool: ref, Action: "allow"},
			},
		},
	})
	if err != nil {
		panic(err)
	}

	fmt.Println(session.MCPURL)
}
```

[Connect an MCP client](https://docs.digitalocean.com/products/managed-agents/action-gateway/how-to/connect-action-gateway/index.html.md#connect-an-external-mcp-client) to use the Toolbelt’s member tools under this policy.

## Create a Toolbelt Using the Control Panel

1. In the Control Panel, go to **Managed Agents**, and click **Action Gateway**.
2. In the **Toolbelts** tab, click **Create a toolbelt** in the top right corner.
3. Name the toolbelt, add a description, and select the tools you want to include.
4. Click **Create Toolbelt**.

The toolbelt appears in the **Toolbelts** tab.