Strands Agents extension of AgentKit. Enables agentic workflows to interact with onchain actions.
- CDP API Key
- Amazon Bedrock Models
- Configure AWS Credentials OR use Amazon Bedrock API keys alternatively for Amazon Bedrock model access with Strands Agents.
- Set up Amazon Bedrock
NOTE: Strands Agents is model provider agnostic
pip install coinbase-agentkit coinbase-agentkit-strands-agentsSet 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.
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.
See CONTRIBUTING.md for detailed setup instructions and contribution guidelines.