Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,24 @@ export STRANDS_SYSTEM_PROMPT="You are a Python expert."
echo "You are a security expert." > .prompt
```

## 🌍 Environment Variables Configuration

Strands Agent Builder also provides customization through environment variables:

| Environment Variable | Description | Default |
|----------------------|-------------|---------|
| STRANDS_MODEL_ID | Claude model ID to use for inference | us.anthropic.claude-sonnet-4-20250514-v1:0 |
| STRANDS_MAX_TOKENS | Maximum tokens for agent responses | 32768 |
| STRANDS_BUDGET_TOKENS | Token budget for agent thinking/reasoning | 2048 |
| STRANDS_THINKING_TYPE | Type of thinking capability | enabled |
| STRANDS_ANTHROPIC_BETA | Anthropic beta features (comma-separated) | interleaved-thinking-2025-05-14 |
| STRANDS_CACHE_TOOLS | Tool caching strategy | default |
| STRANDS_CACHE_PROMPT | Prompt caching strategy | default |
| STRANDS_SYSTEM_PROMPT | Custom system prompt (overrides .prompt file) | None |
| STRANDS_KNOWLEDGE_BASE_ID | Default Knowledge Base ID | None |
| STRANDS_TOOL_CONSOLE_MODE | Enable rich console UI | enabled |
| BYPASS_TOOL_CONSENT | Skip tool confirmation prompts | false |

## Exit

Type `exit`, `quit`, or press `Ctrl+C`/`Ctrl+D`
Expand Down
4 changes: 3 additions & 1 deletion src/strands_agents_builder/utils/model_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
retries=dict(max_attempts=3, mode="adaptive"),
),
"additional_request_fields": {
"anthropic_beta": ["interleaved-thinking-2025-05-14"],
"thinking": {
"type": os.getenv("STRANDS_THINKING_TYPE", "enabled"),
"budget_tokens": int(os.getenv("STRANDS_BUDGET_TOKENS", "2048")),
Expand All @@ -28,6 +27,9 @@
"cache_tools": os.getenv("STRANDS_CACHE_TOOLS", "default"),
"cache_prompt": os.getenv("STRANDS_CACHE_PROMPT", "default"),
}
ANTHROPIC_BETA_FEATURES = os.getenv("STRANDS_ANTHROPIC_BETA", "interleaved-thinking-2025-05-14")
if len(ANTHROPIC_BETA_FEATURES) > 0:
DEFAULT_MODEL_CONFIG["additional_request_fields"]["anthropic_beta"] = ANTHROPIC_BETA_FEATURES.split(",")


def load_path(name: str) -> pathlib.Path:
Expand Down