Sample research agent that creates its own tools and gets smarter over time.
A research agent that can:
- Create custom tools while you chat (saves Python files, instantly available)
- Remember conversations across sessions (builds knowledge over time)
- Work with multiple AI models (use the best model for each task)
- Run background research (spawn specialist agents to work independently)
# Install
pipx install strands-research-agent
# Run
strands-research-agent
# or
research-agent- AWS CLI configured (
aws configure) - Access to Claude models in AWS Bedrock console
Once configured, the agent will:
- Answer questions using web search and analysis
- Create tools as needed and save them to
./tools/ - Remember your conversations for context
Traditional AI: Fixed capabilities, no memory, starts fresh every time
Research Agent:
- Self-expanding - creates new tools based on what you need
- Persistent - remembers your research across sessions
- Multi-model - can use different AI models for different tasks
Requirements: Python 3.10+
pipx install strands-research-agent
strands-research-agentpipx install strands-research-agent[all]
research-agentgit clone https://github.com/strands-agents/samples.git
cd samples/02-samples/14-research-agent
pip install -e .[dev]
strands-research-agentAWS Setup (Required):
Default model provider is AWS Bedrock:
# Configure AWS credentials
aws configure
# Enable Claude models in AWS console:
# https://console.aws.amazon.com/bedrock/home#/modelaccessAlternative Models (Optional):
For non-AWS setups:
# Use local Ollama models
export MODEL_PROVIDER="ollama"
# (requires ollama installed locally)Ask the agent to create tools and it writes Python code for you:
You: "Create a tool to analyze GitHub repositories"
Agent: *writes GitHub analyzer tool to ./tools/github_analyzer.py*
Agent: "Tool created! Now analyzing repositories..."
The tool is immediately available - no restart needed.
Start long research tasks that run while you do other things:
# Start background research
agent.tool.tasks(
action="create",
task_id="market_research",
prompt="Research AI agent market trends for 2024"
)
# Continue chatting while research runs in background
# Check progress later with:
agent.tool.tasks(action="status", task_id="market_research")Use different models for different types of thinking:
# Use GPT-4 for code analysis (logical)
agent.tool.use_agent(
prompt="Review this code architecture",
model_provider="openai"
)
# Use Claude for creative strategy (intuitive)
agent.tool.use_agent(
prompt="Brainstorm marketing strategies",
model_provider="anthropic"
)Research & Analysis
scraper- Extract data from websiteshttp_request- API calls with authenticationpython_repl- Run Python code for calculationscalculator- Math and calculations
File Operations
editor- Create/modify filesfile_read/file_write- File operationsshell- Command line access
Multi-Agent
tasks- Background processinguse_agent- Delegate to specialist agentsswarm- Coordinate teams of agentsworkflow- Complex multi-step processes
Memory & Learning
store_in_kb- Save knowledge permanentlyretrieve- Find relevant past knowledgesystem_prompt- Modify agent behavior
- AWS Bedrock Claude (default, requires AWS setup)
- OpenAI GPT-4/GPT-4o
- Ollama (local models)
- Anthropic Claude (direct API)
Different models have different strengths - the agent can automatically choose the right one for each task.
"Research the current state of autonomous vehicles and create a competitive analysis report"
"Analyze this CSV file and create visualizations showing trends over time"
"Compare the top 5 Python web frameworks and recommend the best one for my project"
"Research my industry and create social media content ideas for the next month"
The agent can write Python tools for you:
# Ask for custom functionality
agent("Create a tool that monitors cryptocurrency prices")
# Agent creates ./tools/crypto_monitor.py with full implementation
# Tool becomes available immediately as agent.tool.crypto_monitor()Conversations and knowledge accumulate across sessions:
# Session 1: Research AI frameworks
agent("What are the best AI agent frameworks?")
# Session 2 (days later): Agent remembers previous research
agent("Which of those frameworks we discussed has the best multi-agent support?")
# Agent: "Based on our previous analysis of AI frameworks..."📦 research-agent/
├── agent.py # Main chat interface
├── tools/ # Custom tools (auto-created by agent)
│ └── *.py # Tools created during conversations
└── .prompt # Agent personality & instructions
The agent:
- Listens to your questions
- Creates tools if needed (saves Python files to
./tools/) - Uses tools to research and analyze
- Remembers conversations for future sessions
- Gets smarter over time through accumulated knowledge
- Documentation: Strands Agents SDK
- Issues: GitHub Issues
- Examples: Check the
./tools/directory after chatting with the agent
Want to improve the research agent?
- Fork on GitHub
- Clone locally:
git clone your-fork-url - Install dev dependencies:
pip install -e .[dev] - Make changes
- Test with
strands-research-agent - Submit pull request
The agent creates tools in real-time, so you can see your changes immediately.
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Built with Strands Agents SDK