Skip to main content

Overview

The CrewAI integration builds dynamic BaseTool classes from canonical tool schemas, enabling multi-agent role-based workflows with wallet operations.

Quick Start

1

Create the toolkit

from cobo_agentic_wallet.client import WalletAPIClient
from cobo_agentic_wallet.integrations.crewai import CoboAgentWalletCrewAIToolkit

client = WalletAPIClient(
    base_url="https://api.agenticwallet.cobo.com",
    api_key="<api_key>",
)
toolkit = CoboAgentWalletCrewAIToolkit(client=client)
tools = toolkit.get_tools()
2

Use with a CrewAI agent

uv run --extra crewai python examples/crewai_agent.py

Tool Selection

You can restrict which CAW tools CrewAI receives:
toolkit = CoboAgentWalletCrewAIToolkit(
    client=client,
    include_tools=["submit_pact", "get_pact", "transfer_tokens", "get_transaction_record_by_request_id"],
)
Use this when each CrewAI agent should only see the minimal wallet surface relevant to its role.

Denial Behavior

  • Policy denials — returned as tool output so agents can adjust
  • Other API failures — raised as runtime errors
CrewAI enables role-based workflows where different agents handle different responsibilities. For example, a “researcher” agent checks balances while a “trader” agent executes transfers — each with their own delegation policies.

Source Code

src/cobo_agentic_wallet/integrations/crewai/toolkit.py