Skip to main content

Before you start

Complete the CLI quickstart first so your runtime already has a paired wallet, API key, and wallet UUID.

5-minute outcome

  1. Register CoboAgentWalletTools with Agno agent
  2. Submit a pact and wait for owner approval
  3. Execute success plus denial sequence
  4. Retry based on denial guidance
  5. Validate in audit logs

Step 1: Install

pip install "cobo-agentic-wallet[agno]"

Step 2: Configure environment

export AGENT_WALLET_API_URL=https://api.agenticwallet.cobo.com
export AGENT_WALLET_API_KEY=your-api-key
export OPENAI_API_KEY=your-openai-api-key

Step 3: Create Agno agent

agno_quickstart.py
from __future__ import annotations

import asyncio
import os

from agno.agent import Agent
from agno.models.openai import OpenAIChat

from cobo_agentic_wallet.client import WalletAPIClient
from cobo_agentic_wallet.integrations.agno import CoboAgentWalletTools


def main() -> None:
    client = WalletAPIClient(
        base_url=os.environ["AGENT_WALLET_API_URL"],
        api_key=os.environ["AGENT_WALLET_API_KEY"],
    )
    tools = CoboAgentWalletTools(client=client)

    wallet_uuid = "your-wallet-uuid"
    destination = "0x1111111111111111111111111111111111111111"

    agent = Agent(
        model=OpenAIChat(id="gpt-4.1-mini"),
        tools=[tools],
        markdown=True,
        instructions=(
            "Use Cobo tools. Before executing transfers, submit a pact using submit_pact and "
            "wait until its status is active. If a transfer is denied, parse the suggestion "
            "and retry with a compliant amount."
        ),
    )

    prompt = (
        f"Use wallet {wallet_uuid}. "
        "First, submit a pact with intent 'Transfer tokens for testing', permissions "
        "write:transfer, max_tx 100, and duration 86400. Wait until the pact is active. "
        f"Then transfer 50 USDC from wallet {wallet_uuid} to {destination} on BASE. "
        "Then attempt 200 USDC. If denied, retry with a compliant amount from the suggestion. "
        f"Finally fetch audit logs for wallet {wallet_uuid}."
    )

    asyncio.run(agent.aprint_response(prompt))
    asyncio.run(client.close())


if __name__ == "__main__":
    main()
If you want to keep the runtime narrower at first, select a smaller tool subset:
tools = CoboAgentWalletTools(
    client=client,
    include_tools=[
        "submit_pact",
        "get_pact",
        "transfer_tokens",
        "estimate_transfer_fee",
        "get_transaction_record_by_request_id",
        "get_audit_logs",
    ],
)

Step 4: Validate behavior

Look for:
  • pact submission and activation confirmation
  • successful first transfer
  • denial details surfaced as tool output
  • corrected retry
  • audit confirmation

Go further

CoboAgentWalletTools gives you the widened CAW runtime toolkit as Agno-native tools. You can extend it:
  • Write custom Agno tools — subclass or define additional tool functions backed by WalletAPIClient for your specific use case (e.g. multi-step DeFi flows, price-conditional transfers). Register them alongside CoboAgentWalletTools.
  • Use the Python SDK for structured operations — call WalletAPIClient directly outside the agent for operations that need deterministic outcomes: pact management, batch queries, and policy dry-runs.
  • Pair with CLI for onboarding and ops — use caw for provisioning and debugging without touching agent code.
  • Use role-based presets — start with Pact Drafting, Execution, and Observer responsibilities rather than giving every agent the full toolkit.

Agno Integration Details

Sync/async tool surfaces and metadata behavior.

Python SDK

Use WalletAPIClient directly for custom tool functions.