Coinbase AgentKit PydanticAI Extension
This package provides integration between Coinbase AgentKit and PydanticAI, allowing you to use AgentKit actions as tools in PydanticAI agents.
Setup
Prerequisites
Installation
pip install coinbase-agentkit coinbase-agentkit-pydantic-ai
Environment Setup
Set the following environment variables:
export OPENAI_API_KEY=<your-openai-api-key>
export CDP_API_KEY_ID=<your-cdp-api-key-id>
export CDP_API_KEY_SECRET=<your-cdp-api-key-secret>
export CDP_WALLET_SECRET=<your-cdp-wallet-secret>
export NETWORK_ID=<your-network-id>
Usage
Basic Setup
from coinbase_agentkit import AgentKit
from coinbase_agentkit_pydantic_ai import get_pydantic_ai_tools
from pydantic_ai import Agent
# Initialize AgentKit
agent_kit = AgentKit()
# Get PydanticAI compatible tools
tools = get_pydantic_ai_tools(agent_kit)
# Create PydanticAI agent with the tools
agent = Agent(
'openai:gpt-4o',
tools=tools,
system_prompt='You are a helpful crypto trading assistant.'
)
# Use the agent
result = agent.run_sync('What is my wallet balance?')
print(result.output)
For AgentKit configuration options, see the Coinbase Agentkit README.
For a full example, see the chatbot example.
For PydanticAI configuration options, see the PydanticAI Documentation.
Contributing
See CONTRIBUTING.md for detailed setup instructions and contribution guidelines.
Metadata
Release files for coinbase-agentkit-pydantic-ai 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| coinbase_agentkit_pydantic_ai-0.1.0.tar.gz | 4.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| coinbase_agentkit_pydantic_ai-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.8 kB
Release files / coinbase_agentkit_pydantic_ai-0.1.0.tar.gz
| Download URL | coinbase_agentkit_pydantic_ai-0.1.0.tar.gz |
|---|---|
| Size | 4.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fbaa271253a83ca4c02e95aeafe89d14df16ec57ea3e266060105e067008a06d
|
|
BLAKE2b-256 checksum How to use checksums |
d92a7bca73afb8343c58aa500b1f0f8a1db32dfcaea2963d67245c460f693015
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 6, 2025.
Transparency logRelease files / coinbase_agentkit_pydantic_ai-0.1.0-py3-none-any.whl
| Download URL | coinbase_agentkit_pydantic_ai-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d2e056687d7438a954a505b3f993a836ce8c3ffde9da6931024cd8339ab8b382
|
|
BLAKE2b-256 checksum How to use checksums |
0b782b5aa4e76f386333983df052ef9009e2ad8934c3e1eaa9d195dd6b68d9a1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 6, 2025.
Transparency log