Skip to content

Latest commit

 

History

History
68 lines (47 loc) · 2.52 KB

File metadata and controls

68 lines (47 loc) · 2.52 KB

AgentKit Strands Agents Extension

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

Setup

Prerequisites

Installation

pip install coinbase-agentkit coinbase-agentkit-strands-agents

Environment Setup

Set the following environment variables:

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 AWS_ACCESS_KEY_ID=<your-aws-access-key-id>
export AWS_SECRET_ACCESS_KEY=<your-aws-secret-access-key>
export AWS_REGION=<your-aws-region>

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.

Usage

Basic Setup

from coinbase_agentkit import AgentKit
from coinbase_agentkit_strands_agents import get_strands_tools
from strands.models import BedrockModel
from strands import Agent

agentKit = AgentKit()

tools = get_strands_tools(agentKit)

llm = BedrockModel(
    model_id="us.amazon.nova-pro-v1:0",
    region_name='us-east-1' ## set to the appropriate region with model access
)

agent = Agent(
    model=llm,
    tools=tools,
)

For AgentKit configuration options, see the Coinbase Agentkit README.

For Strands Agents configuration options, see the Strands Agents Documentation.

For a full example, see the chatbot example.

Contributing

See CONTRIBUTING.md for detailed setup instructions and contribution guidelines.