Reactive Machines

Build a drug research assistant using strands agents and Amazon Bedrock

Drug diagnosis is a complex process, the time we need researchers that they wander a large number of scientific literature, trial data, and Mealulian details. Life science customers such as Genntentech and astrazeneca use agents AIs and other AI products increase the speed of scientific acquisition. Builders in these organizations are already using the total amazon bedrock features to redeem specific work travel in various ways of use, from drug-oversight management in the health care provider.

However, the most commonly used cases can benefit from using the open source of SDK SDK. Stys agents take a set of model to improve and run Agents. It works with many model suppliers, including custom models and llm), as well as the agents that may be sent to request Python application.

In this sentence, we show how you can create a powerful research assistant to get drug available using Strands and Amazon Bedrock agents. This AI helper can burn more information at the same time by using the Mongo model (MCP), including complete reports, and produce complete drug equipment, treatments and treatments. This helper is available for an example of open health care and science science agent Toolkit to use and adapt.

Looking for everything

This solution uses strands for connecting the most effective support agents (FMS) with the sources of normal scientific data such as Arxiv, PUBMED, and Chembl. It shows that you can create a speed up of MCP servers to ask the data and look at the interpreting outcomes of conversation.

Small agencies, focusal Ai working together often produce better results than one, monolithic agent. This solution uses a group of sub-agents, each has the FM, instructions, and tools. The following flowchart indicates that the aging orchestrator (shown in orange) deals with user questions and is submitted to the Information Office or Editing, Confusion, and purplies).

This post is focused on creating strands agents in your area of development. See STAMNS Agents Docents to submit the production agents to producing AWS LAMBApe, Amazon Elastic service (Amazon Ex), or the Amazon cloud of Lastic Compute (or Amazon EC2).

In the following sections, we show how to build a research assistant on the Strands agents by describing FM, MCP tools, and sub-Aprenti.

Requirements

This solution requires Python 3.10+, strands-agents, and several Python packages. We highly recommend using visible environment such as Venv or UV handle these dependents.

Complete the following steps to send a solution to your area:

  1. Clone codes collection from Gitity.
  2. Enter the required leaning of python with pip install -r requirements.txt.
  3. Configure your AWS guarantees yourself as natural variables, including the PrOOS file, or follow another supportful process.
  4. Keep your Tavily API key in the .env file in the following format: TAVILY_API_KEY="YOUR_API_KEY".

You also need access to the following Amazon Forms on your AWS account:

  • Anthropic's Claude 3.7 Sonnet
  • Anthropic's Claude 3.5 Sonnet
  • Anthropic's Claude 3.5 Haiku

Describe the base model

We begin by explaining the connection with FM in Amazon Bedrock using the strands agents BedrockModel category. We use anthropic's Claudude 3.7 Sonnet as an automated model. See the following code:

from strands import Agent, tool
from strands.models import BedrockModel
from strands.agent.conversation_manager import SlidingWindowConversationManager
from strands.tools.mcp import MCPClient
# Model configuration with Strands using Amazon Bedrock's foundation models
def get_model():
    model = BedrockModel(
        boto_client_config=Config(
            read_timeout=900,
            connect_timeout=900,
            retries=dict(max_attempts=3, mode="adaptive"),
        ),
        model_id="us.anthropic.claude-3-7-sonnet-20250219-v1:0",
        max_tokens=64000,
        temperature=0.1,
        top_p=0.9,
        additional_request_fields={
            "thinking": {
                "type": "disabled"  # Can be enabled for reasoning mode
            }
        }
    )
    return model

Describe MCP Tools

The MCP provides the AI programs in contact with their external facilities. Thousands of MCP servers are already available, including those scientific tools and datasets. This solution provides examples of MCP for MCP for:

  • Arxiv – an open space for finding talents of the course
  • PUBMED – Peer-Town Reviews for Biomedical Books
  • Chembl – a selected biocle database with buildings such as drug
  • ClinicalTrialS.gov – US Government Government Database
  • Basic Web Search – API to get the latest news and other content from public Internet

Stys agents oversee MCP customer description to our agents. In this example, he connects each tool using the standard I / O. See the following code:

# MCP Clients for various scientific databases
tavily_mcp_client = MCPClient(lambda: stdio_client(
    StdioServerParameters(command="python", args=["application/mcp_server_tavily.py"])
))
arxiv_mcp_client = MCPClient(lambda: stdio_client(
    StdioServerParameters(command="python", args=["application/mcp_server_arxiv.py"])
))
pubmed_mcp_client = MCPClient(lambda: stdio_client(
    StdioServerParameters(command="python", args=["application/mcp_server_pubmed.py"])
))
chembl_mcp_client = MCPClient(lambda: stdio_client(
    StdioServerParameters(command="python", args=["application/mcp_server_chembl.py"])
))
clinicaltrials_mcp_client = MCPClient(lambda: stdio_client(
    StdioServerParameters(command="python", args=["application/mcp_server_clinicaltrial.py"])
))

Describe Special Agents

The planning agent looks at the user's questions and creates a sub-agents program and use tools:

@tool
def planning_agent(query: str) -> str:
    """
    A specialized planning agent that analyzes the research query and determines
    which tools and databases should be used for the investigation.
    """
    planning_system = """
    You are a specialized planning agent for drug discovery research. Your role is to:
    
    1. Analyze research questions to identify target proteins, compounds, or biological mechanisms
    2. Determine which databases would be most relevant (Arxiv, PubMed, ChEMBL, ClinicalTrials.gov)
    3. Generate specific search queries for each relevant database
    4. Create a structured research plan
    """
    model = get_model()
    planner = Agent(
        model=model,
        system_prompt=planning_system,
    )
    response = planner(planning_prompt)
    return str(response)

Similarly, the synthesis agent includes findings in many sources into a single, full report:

@tool
def synthesis_agent(research_results: str) -> str:
    """
    Specialized agent for synthesizing research findings into a comprehensive report.
    """
    system_prompt = """
    You are a specialized synthesis agent for drug discovery research. Your role is to:
    
    1. Integrate findings from multiple research databases
    2. Create a comprehensive, coherent scientific report
    3. Highlight key insights, connections, and opportunities
    4. Organize information in a structured format:
       - Executive Summary (300 words)
       - Target Overview
       - Research Landscape
       - Drug Development Status
       - References
    """
    model = get_model()
    synthesis = Agent(
        model=model,
        system_prompt=system_prompt,
    )
    response = synthesis(synthesis_prompt)
    return str(response)

Describe an orchestralization agent

It also describes an orchestive agent to link every job of work. This ment is using SlidingWindowConversationManager Category from the STLANDS agents to keep 10 last messages in the conversation. See the following code:

def create_orchestrator_agent(
    history_mode,
    tavily_client=None,
    arxiv_client=None,
    pubmed_client=None,
    chembl_client=None,
    clinicaltrials_client=None,
):
    system = """
    You are an orchestrator agent for drug discovery research. Your role is to coordinate a multi-agent workflow:
    
    1. COORDINATION PHASE:
       - For simple queries: Answer directly WITHOUT using specialized tools
       - For complex research requests: Initiate the multi-agent research workflow
    
    2. PLANNING PHASE:
       - Use the planning_agent to determine which databases to search and with what queries
    
    3. EXECUTION PHASE:
       - Route specialized search tasks to the appropriate research agents
    
    4. SYNTHESIS PHASE:
       - Use the synthesis_agent to integrate findings into a comprehensive report
       - Generate a PDF report when appropriate
    """
    # Aggregate all tools from specialized agents and MCP clients
    tools = [planning_agent, synthesis_agent, generate_pdf_report, file_write]
    # Dynamically load tools from each MCP client
    if tavily_client:
        tools.extend(tavily_client.list_tools_sync())
    # ... (similar for other clients)
    conversation_manager = SlidingWindowConversationManager(
        window_size=10,  # Maintains context for the last 10 exchanges
    )
    orchestrator = Agent(
        model=model,
        system_prompt=system,
        tools=tools,
        conversation_manager=conversation_manager
    )
    return orchestrator

An example of an example of example: Check the latest breast cancer study

Checking a new assistant, Generate the Runninglit Run / Appersonal Apperson and unlock the following research. including quotes.

Amazon Bedrock-Powered Discover Drug Recordy Agent Chat showing a systematic way of its report

The following is quoted from the report produced:

Comprehensive Scientific Report: HER2 in Breast Cancer Research and Treatment
1. Executive Summary
Human epidermal growth factor receptor 2 (HER2) continues to be a critical target in breast cancer research and treatment development. This report synthesizes recent findings across the HER2 landscape highlighting significant advances in understanding HER2 biology and therapeutic approaches. The emergence of antibody-drug conjugates (ADCs) represents a paradigm shift in HER2-targeted therapy, with trastuzumab deruxtecan (T-DXd, Enhertu) demonstrating remarkable efficacy in both early and advanced disease settings. The DESTINY-Breast11 trial has shown clinically meaningful improvements in pathologic complete response rates when T-DXd is followed by standard therapy in high-risk, early-stage HER2+ breast cancer, potentially establishing a new treatment paradigm.

Significantly, you do not have to describe the step action process to achieve this work. By providing a well-given tools for the tools, they can decide whether to use it and what you are in a row.

Clean

If you follow this example on your local computer, you will not create new services in your AWS account you need to clean. When you write a research assistant using one of those services, see the relevant documentation of the management instructions.

Store

In this case, we showed how the agents's strands meet the creation of mighty assistants, AI. We encourage you to try this solution to your research questions and then refer you to new scientific tools. A combination of skills agents agents, streaming answers, and convertible configurations in the powerful Amazon Bedrock language forms creates a new research paradig helped by AI. As the volume of scientific knowledge continues to grow more, the structures such as strands agents will be important tools for drug acquaintance.

In order to learn more about intelligent agents with Agricults, refer to the introduction of the Ai agents SDK agents, SDK agents, and GitHub repository. You can also find multiple health care agents and the health science built in Amazon Bedrock.

With more information about using the strong AI solution solutions to AWS, visit us in the Science Wife Science.


About the authors

Hasun Yuhot's HeadshotHasin Yu Is the construction of the AI / ML solutions in intensive technology in developing, developing, and sending ai / ML health solutions and health science. Supports the approval of advanced AWS AW / ML services, including Agerative and Agentic AI.

Delivered Brian head shotBrian is honest Are the construction of AI / ML Ver solutions in the global health team and Life Sciences Team in Amazon Web Services. You have knowledge of more than 20 for a biotechnology and a machine reading and you like to use AI to improve human and well-being.

Source link

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button