Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ OpenAI Agents SDK extension of AgentKit. Enables agentic workflows to interact w

See [AgentKit OpenAI Agents SDK](./framework-extensions/openai-agents-sdk/README.md) to get started!

#### `coinbase-agentkit-strands-agents`

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

See [AgentKit Strands Agents](./framework-extensions/strands-agents/README.md) to get started!

### `create-onchain-agent`

A quickstart CLI tool to scaffold out a chatbot using Coinbase AgentKit. Runnable via `pipx run create-onchain-agent`.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
CDP_API_KEY_ID= # Place your CDP API key ID here
CDP_API_KEY_SECRET= # Place your CDP API key secret here
CDP_WALLET_SECRET= # Place your CDP Wallet secret here
AWS_ACCESS_KEY_ID= # Place your AWS access key ID here
AWS_SECRET_ACCESS_KEY= # Place your AWS secret access key here
AWS_REGION= # Place your AWS region here.
# Alternative to AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY, you can use AWS_BEARER_TOKEN_BEDROCK
29 changes: 29 additions & 0 deletions python/examples/strands-agents-cdp-server-chatbot/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
ifneq (,$(wildcard ./.env))
include .env
endif

export

.PHONY: install
install:
uv sync

.PHONY: run
run:
uv run chatbot.py

.PHONY: format
format:
uv run ruff format .

.PHONY: format-check
format-check:
uv run ruff format . --check

.PHONY: lint
lint:
uv run ruff check .

.PHONY: lint-fix
lint-fix:
uv run ruff check . --fix
82 changes: 82 additions & 0 deletions python/examples/strands-agents-cdp-server-chatbot/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# CDP Agentkit Strands Agents Extension Examples - Chatbot Python

This example demonstrates an agent setup as a terminal style chatbot with access to the full set of CDP Agentkit actions.

## Ask the chatbot to engage in the Web3 ecosystem!
- "What's my wallet address and balance?"
- "What is the price of BTC?"
- "Request some test tokens from the faucet"
- "Deploy an ERC-20 token with total supply 1 billion"

## Requirements
- Python 3.10+
- uv for package management and tooling
- [uv Installation Instructions](https://github.com/astral-sh/uv?tab=readme-ov-file#installation)
- [CDP API Key](https://portal.cdp.coinbase.com/access/api)
- Amazon Bedrock Models
- [Configure AWS Credentials](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html) OR use [Amazon Bedrock API keys](https://docs.aws.amazon.com/bedrock/latest/userguide/getting-started-api-keys.html) alternatively for Amazon Bedrock model access with Strands Agents.
- [Set up Amazon Bedrock](https://docs.aws.amazon.com/bedrock/latest/userguide/getting-started.html)
> **_NOTE:_** [Strands Agents](https://strandsagents.com/latest/) is model provider agnostic

### Checking Python Version
Before using the example, ensure that you have the correct version of Python installed. The example requires Python 3.10 or higher. You can check your Python version by running:

```bash
python --version
uv --version
```

## Installation
```bash
uv sync
```

## Run the Chatbot

### Set ENV Vars
- Ensure the following ENV Vars are set:
- "CDP_API_KEY_ID"
- "CDP_API_KEY_SECRET"
- "CDP_WALLET_SECRET"
- "AWS_ACCESS_KEY_ID"
- "AWS_SECRET_ACCESS_KEY"
- "AWS_REGION"
- "NETWORK_ID" (Defaults to `base-sepolia`)

⚠ **Note**: If using Bedrock API keys instead of AWS credentials, set `AWS_BEARER_TOKEN_BEDROCK` instead of `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` as environment variable for Bedrock model access. Also make sure the `AWS_REGION` aligns with the AWS region the Bedrock access key was created in.

```bash
uv run chatbot.py
```

---

To run example using `pip` package installer:

```bash
python --version
pip --version
```

## Installation
```bash
pip install coinbase-agentkit coinbase-agentkit-strands-agents
```

## Run the Chatbot

### Set ENV Vars
- Ensure the following ENV Vars are set:
- "CDP_API_KEY_ID"
- "CDP_API_KEY_SECRET"
- "CDP_WALLET_SECRET"
- "AWS_ACCESS_KEY_ID"
- "AWS_SECRET_ACCESS_KEY"
- "AWS_REGION"
- "NETWORK_ID" (Defaults to `base-sepolia`)

⚠ **Note**: If using Bedrock API keys instead of AWS credentials, set `AWS_BEARER_TOKEN_BEDROCK` instead of `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` as environment variable for Bedrock model access. Also make sure the `AWS_REGION` aligns with the AWS region the Bedrock access key was created in.

```bash
python chatbot.py
```
Loading
Loading