This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Tools

Integrations for tools

1 - Agents as Tools

Invoke heterogeneous agents as tools

Dapr Agents supports invoking other agents as tools within an instance of a DurableAgent reasoning loop, including agents from other frameworks such as OpenAI Agents, LangGraph, and CrewAI.

For full documentation and code examples, see Agents as Tools.

2 - MCP Toolbox for Databases

Load MCP Toolbox tools for interacting with databases

Dapr Agents supports integrating with MCP Toolbox for Databases by implementing a wrapper that loads the available tools into the Tool model Dapr Agents utilize.

To integrate the Toolbox, load the tools as follows:

from toolbox_core import ToolboxSyncClient

client = ToolboxSyncClient("http://127.0.0.1:5000")
try:
    agent_tools = AgentTool.from_toolbox_many(client.load_toolset("your-tools-name-here"))
    agent = DurableAgent(
        # ...
        tools=agent_tools,
    )
finally:
    client.close()

Or wrap it in a with statement:

from toolbox_core import ToolboxSyncClient
with ToolboxSyncClient("http://127.0.0.1:5000") as client:
    agent_tools = AgentTool.from_toolbox_many(client.load_toolset("your-tools-name-here"))
    agent = DurableAgent(
        # ...
        tools=agent_tools,
    )