coinbase-agentkit 0.7.x fails on fresh install: imports solana.rpc.api, which solana>=0.37 removed

Open Beginner friendly
#1,485 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
76/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
blockchain

Research direction

Start in pyproject and coinbase_agentkit/wallet_providers/cdp_solana_wallet_provider.py, then reproduce the failure in a fresh Python 3.12 or 3.14 virtual environment with pip install coinbase-agentkit and the reported import command. Resolve the solana dependency incompatibility or migrate the provider as maintainers direct; done means a fresh install imports coinbase_agentkit successfully without a workaround.

Written by the indexing model from the issue text.

Description

Environment: Python 3.12/3.14, fresh venv, pip install coinbase-agentkit (0.7.4)

Repro:

pip install coinbase-agentkit
python -c "import coinbase_agentkit"

Fails immediately:

ModuleNotFoundError: No module named 'solana.rpc.api'
  File ".../coinbase_agentkit/wallet_providers/cdp_solana_wallet_provider.py", line 9, in <module>
    from solana.rpc.api import Client as SolanaClient

Root cause: coinbase-agentkit declares solana as an unconstrained dependency, so pip resolves the latest (0.40.x) — but solana.rpc.api (the sync client) was removed in solana >= 0.37. Fresh installs are broken out of the box; it only works if a consumer happens to pin solana <= 0.36.

Workarounds (until fixed):

  • pip install "solana==0.36.1" after installing agentkit (downgrade), or
  • stub the module at import time when only EVM wallets are used (what I did in a demo):
try:
    import solana.rpc.api
except ImportError:
    import sys, types
    _api = types.ModuleType("solana.rpc.api"); _api.Client = type("Client", (), {})
    sys.modules["solana.rpc.api"] = _api

Suggested fix: pin solana>=0.36,<0.37 in pyproject (or migrate the Solana provider to the async client / solana.rpc.async_api).

Happy to open a PR if maintainers point me at the right place. TypeScript SDK is unaffected.

Dominant language
TypeScript
Stars
1.3k
Forks
822
Avg merge
13h 31m
Merged PRs (30d)
2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from coinbase/agentkit

All issues in coinbase/agentkit

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.