Skip to main content

CrewAI tools for Built-Simple research APIs (PubMed, ArXiv)

Project description

CrewAI Built-Simple Research Tools

🔬 CrewAI tools for searching scientific literature via Built-Simple research APIs.

Features

  • PubMedSearchTool - Search 4.48M+ peer-reviewed medical articles
  • PubMedFullTextTool - Retrieve full article text when available
  • ArXivSearchTool - Search 2.77M+ scientific preprints
  • ResearchTool - Combined search across both databases

All tools use GPU-accelerated hybrid search (semantic + keyword) for fast, accurate results.

Installation

pip install crewai-builtsimple

Or install from source:

pip install git+https://github.com/built-simple/crewai-builtsimple.git

Quick Start

from crewai import Agent, Task, Crew
from crewai_builtsimple import PubMedSearchTool, ArXivSearchTool, ResearchTool

# Create tools
pubmed_tool = PubMedSearchTool()
arxiv_tool = ArXivSearchTool()
research_tool = ResearchTool()  # Searches both!

# Create a research agent
researcher = Agent(
    role="Medical Research Analyst",
    goal="Find relevant scientific literature on given topics",
    backstory="Expert at finding and synthesizing medical research",
    tools=[pubmed_tool, arxiv_tool, research_tool],
    verbose=True
)

# Define a research task
task = Task(
    description="Find recent research on CRISPR gene therapy for cancer treatment",
    expected_output="Summary of 5 key papers with their findings",
    agent=researcher
)

# Run the crew
crew = Crew(agents=[researcher], tasks=[task])
result = crew.kickoff()
print(result)

Tool Details

PubMedSearchTool

Search peer-reviewed medical and biomedical literature.

from crewai_builtsimple import PubMedSearchTool

tool = PubMedSearchTool(
    api_key="optional-api-key",  # For higher rate limits
    timeout=30.0
)

# Agent will use with parameters:
# - query: Search query
# - top_k: Number of results (1-100, default 10)
# - min_year: Filter by publication year (default 2010)

PubMedFullTextTool

Retrieve full text of articles by PMID.

from crewai_builtsimple import PubMedFullTextTool

tool = PubMedFullTextTool()
# Agent provides: pmid (PubMed ID)

ArXivSearchTool

Search ArXiv preprints (physics, CS, math, biology, economics, etc.)

from crewai_builtsimple import ArXivSearchTool

tool = ArXivSearchTool()
# Parameters:
# - query: Search query
# - limit: Number of results (1-100, default 10)
# - search_type: 'hybrid', 'vector', or 'text' (default 'hybrid')

ResearchTool

Combined search across PubMed and ArXiv.

from crewai_builtsimple import ResearchTool

tool = ResearchTool()
# Parameters:
# - query: Search query
# - limit_per_source: Results per database (default 5)
# - sources: 'both', 'pubmed', or 'arxiv' (default 'both')

Example Crew: Research Assistant

from crewai import Agent, Task, Crew, Process
from crewai_builtsimple import PubMedSearchTool, ArXivSearchTool, ResearchTool

# Tools
pubmed = PubMedSearchTool()
arxiv = ArXivSearchTool()
research = ResearchTool()

# Agents
literature_scout = Agent(
    role="Literature Scout",
    goal="Find all relevant papers on a research topic",
    backstory="Skilled at comprehensive literature searches across multiple databases",
    tools=[research],
    verbose=True
)

paper_analyst = Agent(
    role="Paper Analyst", 
    goal="Analyze and synthesize research findings",
    backstory="Expert at reading scientific papers and extracting key insights",
    tools=[pubmed, arxiv],  # Can do targeted follow-up searches
    verbose=True
)

report_writer = Agent(
    role="Report Writer",
    goal="Write clear research summaries",
    backstory="Excellent at explaining complex research in accessible language",
    verbose=True
)

# Tasks
search_task = Task(
    description="Search for recent research on '{topic}'",
    expected_output="List of 10 relevant papers with abstracts",
    agent=literature_scout
)

analysis_task = Task(
    description="Analyze the papers found and identify key themes and findings",
    expected_output="Thematic analysis with supporting evidence from papers",
    agent=paper_analyst
)

report_task = Task(
    description="Write a research summary report",
    expected_output="2-page research summary in markdown format",
    agent=report_writer,
    output_file="research_report.md"
)

# Crew
research_crew = Crew(
    agents=[literature_scout, paper_analyst, report_writer],
    tasks=[search_task, analysis_task, report_task],
    process=Process.sequential,
    verbose=True
)

# Run
result = research_crew.kickoff(inputs={"topic": "mRNA vaccines for cancer"})

API Information

These tools use the Built-Simple research APIs:

Free tier available with IP-based rate limiting. For higher limits, obtain an API key.

License

MIT

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

crewai_builtsimple-0.1.0.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

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

crewai_builtsimple-0.1.0-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file crewai_builtsimple-0.1.0.tar.gz.

File metadata

  • Download URL: crewai_builtsimple-0.1.0.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.2

File hashes

Hashes for crewai_builtsimple-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3af4991f41b85723a0d71172fa22302eb7365cbe11f9a0531c6395e6d9d9c398
MD5 0da95f7a3e45944e4ac79cdde686cda4
BLAKE2b-256 7eb996c5080c9984f605977e56e9429ab1ba417824ee1683954909edf0ef7e4b

See more details on using hashes here.

File details

Details for the file crewai_builtsimple-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for crewai_builtsimple-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 496571041a753e5d9bab8f9c6ab67aa56a52320425e214a0aeafcf62712c2f50
MD5 9a250872319c0ffc333f85f14ccdedcf
BLAKE2b-256 3cb676a2b514ff6cf05277f70f8ef4fc2ae0b60f94b670b24f856d6ff67761b1

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