Agent SDK Setup Tutorial
Deploy your agent architectures using Strands SDK, OpenAI Agents SDK, or LangChain with ready-to-run Python code.
This is a quick-start guide to help you get up and running. For comprehensive documentation, advanced features, and troubleshooting, please visit the official websites linked below. SDKs evolve frequently — always check official docs for the latest APIs.
AWS open-source agent framework
OpenAI agent framework
LLM application framework
Framework Comparison
| Feature | Strands SDK | OpenAI Agents | LangChain |
|---|---|---|---|
| Provider | AWS (Bedrock +) | OpenAI | Any (OpenAI, Anthropic, etc.) |
| Install | strands-agents | openai-agents | langchain langgraph |
| Tool Decorator | @tool | @function_tool | @tool |
| Orchestration | Agents-as-Tools | Handoffs | StateGraph (LangGraph) |
| Execution | Synchronous | Async (Runner.run) | Sync or Async |
Prerequisites
- 1.Python 3.10+ installed on your machine
- 2.A virtual environment (recommended)
- 3.API credentials for your chosen provider
# Create and activate a virtual environment
python -m venv agent-env
# Linux/macOS
source agent-env/bin/activate
# Windows
agent-env\Scripts\activateSDK Setup Guides
Step 1: Install
pip install strands-agents strands-agents-toolsStep 2: Configure Credentials
Strands uses Amazon Bedrock by default. Set your AWS credentials:
export AWS_ACCESS_KEY_ID="your-access-key"
export AWS_SECRET_ACCESS_KEY="your-secret-key"
export AWS_DEFAULT_REGION="us-east-1"Strands also supports other model providers. See provider docs
Step 3: Create Your First Agent
from strands import Agent
# Create a simple agent
agent = Agent(
system_prompt="You are a helpful assistant that answers questions clearly."
)
# Run the agent
response = agent("What is the capital of France?")
print(response)Step 4: Add Tools
from strands import Agent
from strands.tools import tool
@tool
def search_products(query: str) -> str:
"""Search the product catalog.
Args:
query: Search terms for finding products
Returns:
Matching products as a formatted string
"""
return f"Found 3 products matching '{query}'"
agent = Agent(
system_prompt="You help customers find products.",
tools=[search_products]
)
response = agent("Find me wireless headphones under $50")
print(response)Step 5: Multi-Agent Orchestration (Agents-as-Tools)
In Strands, you orchestrate by passing agents as tools to other agents. This is the pattern used in the exported code from Agent Architect.
from strands import Agent
# Specialized agent
product_agent = Agent(
system_prompt="You are a product expert. Answer product questions."
)
# Manager receives product_agent as a tool
manager = Agent(
system_prompt="You coordinate customer requests. Use your tools to delegate.",
tools=[product_agent]
)
response = manager("What wireless headphones do you recommend?")
print(response)Using Exported Code from Agent Architect
- 1Design your architecture in Agent Architect — describe your system, configure agent counts, and generate
- 2Select your SDK — choose Strands SDK, OpenAI Agents SDK, or LangChain from the export format selector
- 3Copy the code — click "Copy Code" and "Copy requirements.txt"
- 4Save and install:
# Save the copied code to a file (e.g. agent_system.py)
# Save the copied requirements to requirements.txt
# Install dependencies
pip install -r requirements.txt
# Configure your credentials (see SDK-specific tabs above)
# Run your agent system
python agent_system.pyCustomizing Your Agents
Replace Tool Stubs
The exported code includes placeholder tool implementations marked with # TODO comments. Replace these with your actual business logic — database queries, API calls, file operations, etc.
Modify System Prompts
System prompts are generated by AI based on your project description. Fine-tune them by editing the triple-quoted strings directly in the Python file.
Add New Tools
Add more tools by following the same decorator pattern used in the exported code. Then add them to the relevant agent's tools=[] list.
For advanced features like memory, persistence, guardrails, streaming, and production deployment, refer to the official documentation: