Metadata-Version: 2.3
Name: coinbase-agentkit-openai-agents-sdk
Version: 0.1.1.dev202503150
Summary: Coinbase AgentKit OpenAI Agents SDK extension
License: Apache-2.0
Keywords: coinbase,sdk,crypto,cdp,openai,agents,ai,agent
Author: John Peterson
Author-email: john.peterson@coinbase.com
Requires-Python: >=3.10,<4.0
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Dist: coinbase-agentkit (>=0.1.0,<0.2.0)
Requires-Dist: openai-agents (>=0.0.2,<0.0.3)
Requires-Dist: pytest-asyncio (>=0.25.3,<0.26.0)
Requires-Dist: python-dotenv (>=1.0.1,<2.0.0)
Description-Content-Type: text/markdown

# AgentKit OpenAI Agents SDK Extension

OpenAI Agents SDK extension of AgentKit. Enables agentic workflows to interact with onchain actions.

## Setup

### Prerequisites

- [CDP API Key](https://portal.cdp.coinbase.com/access/api)
- [OpenAI API Key](https://platform.openai.com/docs/quickstart#create-and-export-an-api-key)

### Installation

```bash
pip install coinbase-agentkit coinbase-agentkit-openai-agents-sdk
```

### Environment Setup

Set the following environment variables:

```bash
export OPENAI_API_KEY=<your-openai-api-key>
export CDP_API_KEY_NAME=<your-cdp-api-key-name>
export CDP_API_KEY_PRIVATE=<your-cdp-api-key-private>
```

## Usage

### Basic Setup

```python
from coinbase_agentkit import AgentKit
from coinbase_agentkit_openai_agents_sdk import get_openai_agents_sdk_tools
from agents import Agent

agentKit = AgentKit()

tools = get_openai_agents_sdk_tools(agentKit)

agent = Agent(
    name="CDP Agent",
    instructions="You are a helpful agent that can interact with the blockchain using AgentKit tools.",
    tools=tools
)
```

For AgentKit configuration options, see the [Coinbase Agentkit README](https://github.com/coinbase/agentkit/blob/master/python/coinbase-agentkit/README.md).

For a full example, see the [chatbot example](https://github.com/coinbase/agentkit/blob/master/python/examples/openai-agents-sdk-cdp-chatbot/chatbot.py).

## Contributing

See [CONTRIBUTING.md](https://github.com/coinbase/agentkit/blob/master/CONTRIBUTING.md) for detailed setup instructions and contribution guidelines.

