coinbase / coinbase/agentkit

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

Open
#1,485 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
1.3k
Forks
815
Avg merge
13h 31m
Merged PRs (30d)
2

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
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):
```python
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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.