AutoGen tools for Built-Simple research APIs (PubMed & ArXiv)
Project description
AutoGen Built-Simple Research Tools
GPU-accelerated research tools for Microsoft AutoGen agents.
Search millions of academic papers on PubMed (4.48M+ articles) and ArXiv (2.77M+ papers) with semantic understanding. Built on Built-Simple's high-performance research APIs.
๐ Features
- ๐ฌ PubMed Search: Semantic + keyword hybrid search across 4.48M biomedical articles
- ๐ ArXiv Search: Fast search across 2.77M preprints (physics, math, CS, AI/ML)
- โก GPU-Accelerated: Millisecond response times via Built-Simple APIs
- ๐ Full Text: Retrieve complete article text from PubMed Central
- ๐ค AutoGen Native: One-line registration with AutoGen agents
๐ฆ Installation
pip install autogen-builtsimple
Or with AutoGen included:
pip install autogen-builtsimple[autogen]
๐ Quick Start
import os
from autogen import ConversableAgent
from autogen_builtsimple import register_research_tools
# Create agents
assistant = ConversableAgent(
name="ResearchAssistant",
system_message="""You are a research assistant that helps find and analyze
scientific papers. Use the search tools to find relevant literature.""",
llm_config={"config_list": [{"model": "gpt-4", "api_key": os.environ["OPENAI_API_KEY"]}]},
)
user_proxy = ConversableAgent(
name="User",
llm_config=False,
is_termination_msg=lambda msg: "TERMINATE" in msg.get("content", ""),
human_input_mode="NEVER",
)
# Register all research tools with one line!
register_research_tools(assistant, user_proxy)
# Start researching
chat_result = user_proxy.initiate_chat(
assistant,
message="Find 5 recent papers on CRISPR gene therapy for cancer treatment"
)
๐ง Available Tools
PubMed Tools
| Tool | Description |
|---|---|
search_pubmed |
Hybrid semantic + keyword search across PubMed |
get_pubmed_full_text |
Retrieve full article text (PMC articles) |
get_pubmed_metadata |
Batch fetch metadata for multiple PMIDs |
ArXiv Tools
| Tool | Description |
|---|---|
search_arxiv |
Hybrid/vector/text search across ArXiv |
get_arxiv_paper_url |
Get PDF and abstract URLs for a paper |
๐ Usage Examples
Search PubMed
from autogen_builtsimple import search_pubmed
# Semantic search for medical literature
results = search_pubmed(
query="machine learning early cancer detection biomarkers",
limit=10,
min_year=2020
)
print(results)
Search ArXiv
from autogen_builtsimple import search_arxiv
# Search for AI papers
results = search_arxiv(
query="large language models reasoning capabilities",
limit=10,
search_type="hybrid" # or "vector" or "text"
)
print(results)
Get Full Text
from autogen_builtsimple import get_pubmed_full_text
# Get complete article text
full_text = get_pubmed_full_text(pmid="35421456")
print(full_text)
Selective Registration
from autogen_builtsimple import register_pubmed_tools, register_arxiv_tools
# Register only PubMed tools
register_pubmed_tools(assistant, user_proxy)
# Or only ArXiv tools
register_arxiv_tools(assistant, user_proxy)
๐ API Keys (Optional)
The tools work without API keys using IP-based rate limiting. For higher limits, get a free API key:
- PubMed: https://pubmed.built-simple.ai
- ArXiv: https://arxiv.built-simple.ai
results = search_pubmed(
query="diabetes treatment",
limit=20,
api_key="your-api-key"
)
๐๏ธ Architecture
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ AutoGen Agent โโโโโโถโ autogen-builtsimple โโโโโโถโ Built-Simple โ
โ (Assistant) โ โ Tools โ โ APIs โ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ
โโโโโโโโโผโโโโโโโโ โโโโโโโโโผโโโโโโโโ
โ PubMed โ โ ArXiv โ
โ GPU Search โ โ GPU Search โ
โ 4.48M docs โ โ 2.77M docs โ
โโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโ
๐ Performance
| Endpoint | Latency | Index Size |
|---|---|---|
| PubMed Hybrid Search | ~100-150ms | 4.48M articles |
| ArXiv Hybrid Search | ~70-90ms | 2.77M papers |
| PubMed Full Text | ~50ms | PMC subset |
๐ค Contributing
Contributions welcome! Please feel free to submit issues and pull requests.
๐ License
MIT License - see LICENSE for details.
๐ Links
- Built-Simple: https://built-simple.ai
- PubMed API Docs: https://pubmed.built-simple.ai/docs
- ArXiv API Docs: https://arxiv.built-simple.ai/docs
- Microsoft AutoGen: https://microsoft.github.io/autogen/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file autogen_builtsimple-0.1.0.tar.gz.
File metadata
- Download URL: autogen_builtsimple-0.1.0.tar.gz
- Upload date:
- Size: 10.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5140042603298f845a37a947144b2f196be88aaf033ce6c606a90b605b5787d4
|
|
| MD5 |
d1b84210e3b7fa4a1b35504075222480
|
|
| BLAKE2b-256 |
204df6c14855f936ea3e4658f5b9b49d895b170d8765cf670828bb980acf260f
|
File details
Details for the file autogen_builtsimple-0.1.0-py3-none-any.whl.
File metadata
- Download URL: autogen_builtsimple-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9853975274e0b474a4a67d4361c0ad3ad8a0e6b110c5348f724cf6a3f7fed53a
|
|
| MD5 |
887ef9a2f23d243713b396d84ca4aba9
|
|
| BLAKE2b-256 |
b60494ebdd624d1a9432ffbb86ec3b804e71da79804e6f6ae997d47b1b7a57a8
|