### Python
**Prerequisites:**
- Python 3.10 or higher
- pip package manager (not required when using the uv alternative below)
- Verify with: `pip --version` or `pip3 --version`
- Usually comes bundled with Python 3.4+ installers from python.org
- If pip is missing, install using one of these methods:
```bash
# Method 1 - Use Python's built-in module
python -m ensurepip --upgrade
# Method 2 - Download and run the official installer
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python get-pip.py
```
**Step 1: Create Virtual Environment**
```bash
# Create virtual environment
python -m venv venv
# Activate virtual environment
# On macOS/Linux:
source venv/bin/activate
# On Windows:
venv\Scripts\activate
```
**Step 2: Install**
```bash
pip install strands-agents
```
This installs the core SDK, which is all the first agent below needs. Many samples need additional packages, so check each sample's README and `requirements.txt` or `pyproject.toml` before running it.
**Alternative: Use uv**
If you prefer [uv](https://docs.astral.sh/uv/), install it using the [official installation instructions](https://docs.astral.sh/uv/getting-started/installation/) and follow these steps instead of Steps 1 and 2 above.
Create a virtual environment:
```bash
uv venv
```
Activate it on macOS/Linux (bash or zsh):
```bash
source .venv/bin/activate
```
Or on Windows (PowerShell):
```powershell
.\.venv\Scripts\Activate.ps1
```
If PowerShell blocks `Activate.ps1`, see Python's [Windows execution policy guidance](https://docs.python.org/3/library/venv.html#creating-virtual-environments) and follow any applicable organizational policies.
Then install the same package:
```bash
uv pip install strands-agents
```
**Your First Agent:**
```python
from strands import Agent
agent = Agent()
response = agent("Hello! Tell me a joke.")
print(response)
```
[Explore Python tutorials →](./python/01-learn/)
|
### TypeScript
**Prerequisites:**
- Node.js 18 or higher
- npm or yarn package manager
**Install:**
```bash
npm install @strands-agents/sdk
```
**Your First Agent:**
```typescript
import { Agent } from "@strands-agents/sdk";
async function main() {
const agent = new Agent({
systemPrompt: "You are a helpful assistant."
});
const response = await agent.invoke("Hello! Tell me a joke.");
console.log(response.toString());
}
main();
```
[Explore TypeScript tutorials →](./typescript/01-learn/)
|