Select Language:
If you’re using AWS CloudShell and want to install Strands Agents with Python 3.11, it’s definitely possible. Since Python 3.11.13 is already available in your environment, you can move forward with the installation without any issues.
To install the Strands Agents SDK on Python 3.11, simply run this command in your CloudShell terminal:
bash
python3.11 -m pip install strands-agents strands-agents-tools
This command makes sure you’re installing the right version of the SDK for your Python 3.11 environment.
Once the installation is complete, you can create a Python script for your agent’s code, such as agent.py
. To run your script, enter:
bash
python3.11 -u agent.py
Before running your agent, check that your AWS credentials are correctly set up in CloudShell. This is especially important if your agent uses Amazon Bedrock models. If you’re planning to work with specific models like Claude from Anthropic, make sure your AWS account has the right permissions and access.
Keep in mind that AWS CloudShell offers 1 GB of persistent storage, so your installed packages and files will stay saved across sessions.
For additional guidance, you can refer to resources like AWS’s documentation on CloudShell upgrades, the introduction of Strands Agents as an open-source SDK, and instructions for running code in Amazon Bedrock AgentCore.