Skip to main content

Sample Research Agent powered by Strands Agents SDK

Project description

Research Agent

PyPI

Sample research agent that creates its own tools and gets smarter over time.

What is this?

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)

Quick Start

# Install 
pipx install strands-research-agent

# Run 
strands-research-agent
# or
research-agent

⚠️ Setup Required: The default model provider is AWS Bedrock, which requires:

  • 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

Why use this?

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

Installation & Setup

Requirements: Python 3.10+

Option 1: Quick Install (Recommended)

pipx install strands-research-agent
strands-research-agent

Option 2: With More AI Models

pipx install strands-research-agent[all]
research-agent

Option 3: Development Setup

git clone https://github.com/strands-agents/samples.git
cd samples/02-samples/14-research-agent  
pip install -e .[dev]
strands-research-agent

AWS 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#/modelaccess

Alternative Models (Optional):

For non-AWS setups:

# Use local Ollama models
export MODEL_PROVIDER="ollama"
# (requires ollama installed locally)

What makes it different?

1. Tool Creation

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.

2. Background Research

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")

3. Multiple AI Models

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"
)

Key Tools

Research & Analysis

  • scraper - Extract data from websites
  • http_request - API calls with authentication
  • python_repl - Run Python code for calculations
  • calculator - Math and calculations

File Operations

  • editor - Create/modify files
  • file_read/file_write - File operations
  • shell - Command line access

Multi-Agent

  • tasks - Background processing
  • use_agent - Delegate to specialist agents
  • swarm - Coordinate teams of agents
  • workflow - Complex multi-step processes

Memory & Learning

  • store_in_kb - Save knowledge permanently
  • retrieve - Find relevant past knowledge
  • system_prompt - Modify agent behavior

AI Models Supported

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

Common Use Cases

Research Projects

"Research the current state of autonomous vehicles and create a competitive analysis report"

Data Analysis

"Analyze this CSV file and create visualizations showing trends over time"

Code & Tech Research

"Compare the top 5 Python web frameworks and recommend the best one for my project"  

Content Creation

"Research my industry and create social media content ideas for the next month"

Advanced Features

Custom Tool Creation

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()

Persistent Memory

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

How it Works

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

  1. Listens to your questions
  2. Creates tools if needed (saves Python files to ./tools/)
  3. Uses tools to research and analyze
  4. Remembers conversations for future sessions
  5. Gets smarter over time through accumulated knowledge

Need Help?

Contributing

Want to improve the research agent?

  1. Fork on GitHub
  2. Clone locally: git clone your-fork-url
  3. Install dev dependencies: pip install -e .[dev]
  4. Make changes
  5. Test with strands-research-agent
  6. Submit pull request

The agent creates tools in real-time, so you can see your changes immediately.

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.


Built with Strands Agents SDK

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

strands_research_agent-0.1.5.tar.gz (42.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

strands_research_agent-0.1.5-py3-none-any.whl (46.0 kB view details)

Uploaded Python 3

File details

Details for the file strands_research_agent-0.1.5.tar.gz.

File metadata

  • Download URL: strands_research_agent-0.1.5.tar.gz
  • Upload date:
  • Size: 42.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for strands_research_agent-0.1.5.tar.gz
Algorithm Hash digest
SHA256 088d76c80bb8e6cfdc006c4c915dfbb9583018b2489b830ddeaa6d90fec4b0e1
MD5 26ed85ed44753721f7658c38a99cbf19
BLAKE2b-256 e5a862a38a5634c22f56835d9f91b78ae9ae8823211bd4b0b8b46c737543c712

See more details on using hashes here.

File details

Details for the file strands_research_agent-0.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for strands_research_agent-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 5582028d083480593248740f96e2796b8b9aefa0630552ce0fbddf73b2dd5c05
MD5 aaee971d174afccd3eeb6aaa4a4bf0fd
BLAKE2b-256 7a5133d2137b669514a9f49f2dd24894343873db7b9ce6546b58cb453c6928f6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page