Coinbase AgentKit PydanticAI extension
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file coinbase_agentkit_pydantic_ai-0.1.0.tar.gz.
File metadata
- Download URL: coinbase_agentkit_pydantic_ai-0.1.0.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fbaa271253a83ca4c02e95aeafe89d14df16ec57ea3e266060105e067008a06d
|
|
| MD5 |
4bf28681236c8ff374fbefaddda22215
|
|
| BLAKE2b-256 |
d92a7bca73afb8343c58aa500b1f0f8a1db32dfcaea2963d67245c460f693015
|
Provenance
The following attestation bundles were made for coinbase_agentkit_pydantic_ai-0.1.0.tar.gz:
Publisher:
publish_pypi_coinbase_agentkit_pydantic_ai.yml on coinbase/agentkit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
coinbase_agentkit_pydantic_ai-0.1.0.tar.gz -
Subject digest:
fbaa271253a83ca4c02e95aeafe89d14df16ec57ea3e266060105e067008a06d - Sigstore transparency entry: 477067476
- Sigstore integration time:
-
Permalink:
coinbase/agentkit@8f8c76ac49d2275cf02be949e027e0ea1ed0fa80 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/coinbase
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish_pypi_coinbase_agentkit_pydantic_ai.yml@8f8c76ac49d2275cf02be949e027e0ea1ed0fa80 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file coinbase_agentkit_pydantic_ai-0.1.0-py3-none-any.whl.
File metadata
- Download URL: coinbase_agentkit_pydantic_ai-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d2e056687d7438a954a505b3f993a836ce8c3ffde9da6931024cd8339ab8b382
|
|
| MD5 |
6802de954b71379df3e72e6f0d1a17c5
|
|
| BLAKE2b-256 |
0b782b5aa4e76f386333983df052ef9009e2ad8934c3e1eaa9d195dd6b68d9a1
|
Provenance
The following attestation bundles were made for coinbase_agentkit_pydantic_ai-0.1.0-py3-none-any.whl:
Publisher:
publish_pypi_coinbase_agentkit_pydantic_ai.yml on coinbase/agentkit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
coinbase_agentkit_pydantic_ai-0.1.0-py3-none-any.whl -
Subject digest:
d2e056687d7438a954a505b3f993a836ce8c3ffde9da6931024cd8339ab8b382 - Sigstore transparency entry: 477067501
- Sigstore integration time:
-
Permalink:
coinbase/agentkit@8f8c76ac49d2275cf02be949e027e0ea1ed0fa80 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/coinbase
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish_pypi_coinbase_agentkit_pydantic_ai.yml@8f8c76ac49d2275cf02be949e027e0ea1ed0fa80 -
Trigger Event:
workflow_dispatch
-
Statement type: