How to Create and Use Toolbeltspublic
Last verified 16 Oct 2026
Action Gateway gives applications and AI agents governed access to tens of thousands of tools through a managed MCP endpoint or SDK. See What You Can Build for example use cases of Action Gateway with Harness Runtime.
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. For a managed environment spec, see Connect Action Gateway to Harness Runtime.
Prerequisites
- Access to Action Gateway for your DigitalOcean team.
- A DigitalOcean personal access token authorized for Action Gateway if you use the SDK. Keep it in your local
DIGITALOCEAN_TOKENenvironment variable.
Creating a Toolbelt does not run its tools. Some member tools, including Exa web search and web fetch, require a positive prepaid balance 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.
Install PyDo:
pip install pydoIn a local Python interpreter, run:
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)Install Godo:
go get github.com/digitalocean/godoCreate and run a local program with:
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 to use the Toolbelt’s member tools under this policy.
Create a Toolbelt Using the Control Panel
- In the Control Panel, go to Managed Agents, and click Action Gateway.
- In the Toolbelts tab, click Create a toolbelt in the top right corner.
- Name the toolbelt, add a description, and select the tools you want to include.
- Click Create Toolbelt.
The toolbelt appears in the Toolbelts tab.