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.

Framework Comparison

FeatureStrands SDKOpenAI AgentsLangChain
ProviderAWS (Bedrock +)OpenAIAny (OpenAI, Anthropic, etc.)
Installstrands-agentsopenai-agentslangchain langgraph
Tool Decorator@tool@function_tool@tool
OrchestrationAgents-as-ToolsHandoffsStateGraph (LangGraph)
ExecutionSynchronousAsync (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
bash
# Create and activate a virtual environment
python -m venv agent-env

# Linux/macOS
source agent-env/bin/activate

# Windows
agent-env\Scripts\activate

SDK Setup Guides

Strands is an open-source agent framework from AWS. Uses a simple Agent class and @tool decorator.

Step 1: Install

bash
pip install strands-agents strands-agents-tools

Step 2: Configure Credentials

Strands uses Amazon Bedrock by default. Set your AWS credentials:

bash
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

python
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

python
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.

python
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

  1. 1
    Design your architecture in Agent Architect — describe your system, configure agent counts, and generate
  2. 2
    Select your SDK — choose Strands SDK, OpenAI Agents SDK, or LangChain from the export format selector
  3. 3
    Copy the code — click "Copy Code" and "Copy requirements.txt"
  4. 4
    Save and install:
bash
# 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.py

Customizing 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:

Ready to Build?

Design your agent architecture and export production-ready SDK code.