Skip to main content

Python SDK for Cobo Agent Wallet - The Programmable Bank for Autonomous Agents

Project description

Cobo Agentic Wallet SDK

Don't give your agent a wallet. Give it a Budget and a Rulebook.

PyPI version Python versions License

The Cobo Agentic Wallet SDK lets AI agents manage crypto wallets with built-in policy guardrails. Instead of giving your agent unrestricted access to a wallet, you define budgets, spending limits, and rules — the policy engine enforces them automatically.

Features

  • Policy Engine — Per-transaction limits, daily/monthly budgets, token allowlists. Denials include structured suggestion and details fields so agents can self-correct.
  • Delegation Model — Owners define what agents can do via delegations. Agents operate within those boundaries without needing owner keys.
  • DeFi Ready — Execute Uniswap V3 swaps, Aave V3 lending, Jupiter swaps on Solana, DCA, grid trading, and more — all through policy-enforced contract calls.
  • Framework Integrations — Drop-in toolkits for LangChain, OpenAI Agents SDK, Agno, CrewAI, MCP, and Claude Code.
  • CLI + SDK — Full-featured caw CLI (Go binary) for interactive use and async Python SDK for programmatic access.

Install

CLI (Go binary)

The caw CLI is distributed as a standalone Go binary. Use the bootstrap script to install:

# Via bootstrap script (included in skills)
bash scripts/bootstrap-env.sh

Python SDK

pip install cobo-agentic-wallet

Quick start

CLI

# Set environment
export AGENT_WALLET_API_URL=https://api-agent-wallet-core.sandbox.cobo.com

# Onboard: pair agent with owner and create wallet
caw onboard --token <TOKEN> --create-wallet --env sandbox

# Transfer tokens
caw tx transfer <wallet_uuid> --to 0xABC... --token ETH_USDC --amount 10 --chain ETH

# Check balance
caw wallet balance <wallet_uuid>

# Contract call (EVM)
caw tx call <wallet_uuid> --contract 0x... --calldata 0x... --chain ETH

# Contract call (Solana)
caw tx call <wallet_uuid> --instructions '<json>' --chain SOL --src-addr <addr>

Python SDK

from cobo_agentic_wallet.client import WalletAPIClient

async with WalletAPIClient(
    base_url="https://api-agent-wallet-core.sandbox.cobo.com",
    api_key="your-key",
) as client:
    # List wallets
    wallets = await client.list_wallets()

    # Transfer with policy enforcement
    result = await client.transfer_tokens(
        wallet_uuid,
        dst_addr="0xABC...",
        token_id="ETH_USDC",
        amount="10",
        chain_id="ETH",
    )

Framework Integrations

Framework Install Import
LangChain pip install cobo-agentic-wallet[langchain] from cobo_agentic_wallet.integrations.langchain import CoboAgentWalletToolkit
OpenAI Agents pip install cobo-agentic-wallet[openai] from cobo_agentic_wallet.integrations.openai import CoboOpenAIAgentContext
Agno pip install cobo-agentic-wallet[agno] from cobo_agentic_wallet.integrations.agno import CoboAgentWalletTools
CrewAI pip install cobo-agentic-wallet[crewai] from cobo_agentic_wallet.integrations.crewai import CoboAgentWalletCrewAIToolkit
MCP pip install cobo-agentic-wallet[mcp] python -m cobo_agentic_wallet.mcp

MCP Server

Run the MCP server for use with Claude Desktop or other MCP clients:

AGENT_WALLET_API_URL=https://api-agent-wallet-core.sandbox.cobo.com \
AGENT_WALLET_API_KEY=your-key \
python -m cobo_agentic_wallet.mcp

Add to your MCP client config:

{
  "mcpServers": {
    "cobo-agentic-wallet": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/sdk", "python", "-m", "cobo_agentic_wallet.mcp"],
      "env": {
        "AGENT_WALLET_API_URL": "https://api-agent-wallet-core.sandbox.cobo.com",
        "AGENT_WALLET_API_KEY": "your-api-key"
      }
    }
  }
}

Claude Code Skill

A Claude Code skill is included for AI-assisted wallet operations and DeFi strategy execution:

Install the cobo-agentic-wallet skill from /path/to/sdk/skills/cobo-agentic-wallet/

See skills/README.md for details.

Agent Recipes

Ready-to-use examples for common use cases:

See examples/recipes/ for full implementations.

Why Agentic Wallet?

Giving an AI agent direct access to a crypto wallet is like giving an intern the company credit card with no spending limit. Agentic Wallet solves this with:

  1. Delegations — Define per-transaction, daily, and monthly limits. The agent operates within these boundaries.
  2. Policy Engine — Every transfer is checked against the delegation rules before execution. No exceptions.
  3. Structured Denials — When a transfer is denied, the agent receives a machine-readable explanation with a suggestion field it can use to retry with adjusted parameters.
  4. Audit Trail — Every transfer attempt (allowed and denied) is logged with full context.

Development

git clone https://github.com/CoboGlobal/cobo-agentic-wallet-python-sdk.git
cd cobo-agentic-wallet-python-sdk
uv sync --extra dev
make lint
make test

Documentation

License

Apache License 2.0 — see LICENSE for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cobo_agentic_wallet-0.1.33-py3-none-any.whl (545.0 kB view details)

Uploaded Python 3

File details

Details for the file cobo_agentic_wallet-0.1.33-py3-none-any.whl.

File metadata

File hashes

Hashes for cobo_agentic_wallet-0.1.33-py3-none-any.whl
Algorithm Hash digest
SHA256 f3200a4868ac8714a6a35d012196bb57e7647bc57a24c1211af88c2bde59d74d
MD5 da3157377ce9fd5ccf857225a2ff8b55
BLAKE2b-256 db7370d9925614e6ea626f5470f15191ba5d215a11d20444690f91cf5fbc2a31

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page