---
title: "Environment Variable Management"
category: 04-action-execution
level: basic
stability: stable
description: "Apply environment variable management in AI agent workflows."
added: "2025-03"
---

![Dependency Status](https://img.shields.io/endpoint?url=https://samotech.github.io/skills-tree/badges/skills-04-action-execution-env-vars.json)

# Environment Variable Management

**Category:** `action-execution`  
**Skill Level:** `basic`  
**Stability:** `stable`
**Added:** 2025-03

### Description

Read, set, and manage environment variables for configuration and secret injection in agent workflows.

### Example

```python
import os
from dotenv import load_dotenv

load_dotenv()  # Load .env file
api_key = os.environ.get('OPENAI_API_KEY')
os.environ['LOG_LEVEL'] = 'DEBUG'
```

### Related Skills

- [Shell Command](shell-command.md)
- [Secret Scanning](../14-security/secret-scanning.md)
