Observed since 21 Oct, 10:01 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
A multi-agent AI system for biomedical imaging research with RAG, image analysis, and paper review
A modular, intelligent research assistant that combines literature search, image analysis, and paper review in one conversational interface.
The AI Scientist project is a multi-agent framework that unifies retrieval-augmented generation (RAG), conversational memory, and multimodal vision to accelerate research in biomedical imaging.
Ask about literature:
💬 "What are the latest techniques in adaptive optics microscopy?"
→ Routes to AI Scientist Agent
Upload an image:
🖼️ [Upload: cells.tif]
💬 "Design a segmentation workflow for these nuclei"
→ Routes to Image Analyst Agent
Review a paper:
📄 [Upload: paper.pdf]
💬 "Critique the methodology in this paper"
→ Routes to Paper Reviewer Agent
pip install aibioagent
Package Links:
import aibioagent as aba
aba.quickstart(api_key="sk-your-key") # Setup
response = aba.ask("What is adaptive optics?") # Ask anything
print(response)
import aibioagent as aba
# 1. Set API key
aba.set_api_key("sk-your-openai-key")
# 2. (Optional) Configure models for better quality
aba.set_llm_model("gpt-4o") # Text generation (default: gpt-4o-mini)
aba.set_vision_model("gpt-4o") # Image analysis (default: gpt-4o-mini)
aba.set_embed_model("text-embedding-3-large") # Embeddings (default: text-embedding-3-small)
# 3. Add your research papers (single file or folder)
aba.add_papers("paper.pdf", collection="my_paper") # Single file
aba.add_papers("papers/microscopy", collection="microscopy_papers") # Folder
# 4. Add code documentation (URLs)
# Default URLs for ImageJ, scikit-image, OpenCV, Pillow are included
# Add more if needed:
aba.add_urls(["https://napari.org/"], collection="napari_docs")
# 5. Ask questions
response = aba.ask("What segmentation methods are best for cells?")
# 6. Analyze images
response = aba.ask(
"Suggest a workflow for this image",
image_path="microscopy.tif"
)
# 7. Review papers
response = aba.ask(
"Summarize the methodology",
pdf_path="research_paper.pdf"
)
# 8. Track usage and costs
stats = aba.get_usage_stats()
print(f"Total cost: ${stats['total_cost_usd']:.4f}")
aba.get_usage_stats(print_summary=True) # Detailed breakdown
aba.reset_usage_stats() # Reset tracking
# 9. Check configuration
aba.info() # Shows current models, database path, etc.
You can customize which OpenAI models to use for different tasks:
Available Models:
# LLM Models (text generation)
aba.set_llm_model("gpt-4o") # Most capable, expensive
aba.set_llm_model("gpt-4o-mini") # Balanced (default)
aba.set_llm_model("gpt-3.5-turbo") # Fastest, cheapest
# Vision Models (image analysis)
aba.set_vision_model("gpt-4o") # Best vision understanding
aba.set_vision_model("gpt-4o-mini") # Good balance (default)
# Embedding Models (vector database)
aba.set_embed_model("text-embedding-3-large") # 3072 dim, best quality
aba.set_embed_model("text-embedding-3-small") # 1536 dim, balanced (default)
aba.set_embed_model("text-embedding-ada-002") # 1536 dim, legacy
# Check current configuration
models = aba.get_models()
print(models) # {'llm': 'gpt-4o-mini', 'vision': 'gpt-4o-mini', 'embed': 'text-embedding-3-small'}
⚠️ Important: If you change the embedding model, you must rebuild all vector databases:
aba.set_embed_model("text-embedding-3-large")
# Delete old collections first (incompatible embeddings)
aba.delete_collection("my_papers", confirm=False)
aba.delete_collection("my_docs", confirm=False)
# Now rebuild with new embedding model:
aba.add_papers("papers/", collection="my_papers") # Create fresh
aba.add_urls(urls, collection="my_docs") # Create fresh
Note: add_papers() and add_urls() append to existing collections. If you want to replace a collection, delete it first using delete_collection().
The agents automatically search ALL collections you create, so you don't need to specify which database to query.
📄 Papers Database (Research Literature)
add_papers() with your PDF files/folders"papers"aba.add_papers("papers/", collection="microscopy_papers")💻 Code Documentation Database (Technical Docs)
add_urls() to add online docs"code_docs"aba.add_urls(["https://napari.org/"], collection="napari_docs")aba.get_default_urls()How It Works:
# Build multiple collections
aba.add_papers("papers/microscopy", collection="microscopy_papers")
aba.add_papers("papers/crispr", collection="crispr_papers")
aba.add_urls(["https://napari.org/"], collection="napari_docs")
# Query - automatically searches ALL collections!
response = aba.ask("What are watershed segmentation methods?")
# The agent searches microscopy_papers, crispr_papers, AND napari_docs
See USER_GUIDE.md for complete API documentation
This system is built around specialized AI "agents," each designed for a specific research task:
| Agent | Primary Function |
|---|---|
| AI Scientist Agent | Literature-grounded scientific reasoning via RAG |
| ImageAnalyst Agent | Workflow generation and interpretation of microscopy images |
| PaperReviewer Agent | Scientific paper analysis, critique, and literature review with PDF support |
Each agent is implemented as a composable LangChain Runnable pipeline with shared memory, individual prompt templates, and retrieval logic.
The architecture is fully extensible — future agents (e.g., DataAnalystAgent, or ModelTrainerAgent) can be added easily.
set_api_key(key) - Set OpenAI API keyget_api_key() - Get current API keyset_llm_model(name) - Set text generation model (e.g., "gpt-4o")set_vision_model(name) - Set image analysis model (e.g., "gpt-4o-mini")set_embed_model(name) - Set embedding model (e.g., "text-embedding-3-large")get_models() - Get current model configurationinfo() - Show package configuration (includes all models)add_papers(folder, collection) - Add PDF papers to databaseadd_urls(urls, collection) - Scrape web documentationget_default_urls() - Show included documentation URLslist_collections() - Show all databasessearch_collection(query, collection) - Search specific databasedelete_collection(name, confirm=True) - Remove databaseask(question, image_path, pdf_path) - Ask the AI agentchat(mode="cli"|"gradio") - Start interactive sessionget_usage_stats(print_summary=False, save_to_file=None) - Get token usage and estimated costsreset_usage_stats() - Reset usage tracking to zeroExample:
import aibioagent as aba
# Do some work
aba.ask("What is CRISPR?")
aba.ask("Explain microscopy techniques")
# Check costs
stats = aba.get_usage_stats(print_summary=True)
print(f"Total cost: ${stats['total_cost_usd']:.4f}")
# Save detailed log
aba.get_usage_stats(save_to_file="usage_log.json")
Output:
======================================================================
Token Usage & Cost Summary
======================================================================
Session Start: 2024-12-15T10:30:00
API Calls:
Total Calls: 5
LLM Calls: 4
Embedding Calls: 1
Vision Calls: 0
Token Usage:
Input Tokens: 3,420
Output Tokens: 856
Total Tokens: 4,276
Estimated Cost:
Total Cost (USD): $0.0012
⚠️ Note: Estimates based on Dec 2024 pricing
Breakdown by Model:
gpt-4o-mini:
Calls: 4
Total Tokens: 4,120
Cost (USD): $0.0011
text-embedding-3-small:
Calls: 1
Total Tokens: 156
Cost (USD): $0.0000
======================================================================
Why Cost Tracking Matters:
get_scientist_agent() - Direct agent accessget_image_analyst() - Direct agent accessget_paper_reviewer() - Direct agent accessget_router() - Direct router accessFull API: USER_GUIDE.md
Your literature-powered research assistant
Multimodal vision AI for microscopy workflow design
The ImageAnalyst Agent bridges raw microscopy data and AI-assisted workflow design. It reads uploaded images, extracts metadata and intensity statistics, and proposes step-by-step Fiji or Python analysis pipelines tailored to the data’s characteristics.
Upload PDFs and get instant, evidence-based critiques
graph TB
A[User Query + Files] --> B{Smart Router}
B -->|Paper keywords| C[PaperReviewer Agent]
B -->|Image uploaded| D[ImageAnalyst Agent]
B -->|Science Q&A| E[AI Scientist Agent]
C --> F[RAG: ChromaDB]
D --> F
E --> F
C --> G[GPT-4 LLM]
D --> H[GPT-4 Vision]
E --> G
F --> I[Shared Memory]
G --> I
H --> I
I --> J[Gradio UI]
Key Components:
pip install -r requirements.txt
Create a .env file in the project root:
OPENAI_API_KEY=your_api_key_here
Need an API key? See API_KEY_SETUP.md for detailed instructions.
Just want to run tests? No API key needed - tests use mocks:
pytest # Works without API key!
# Add your PDFs to data/papers/
python -m data.document_loader
# Web UI (recommended)
python main.py
# Or CLI mode
python main.py -m cli
Visit http://localhost:7860 and start chatting! 🎉
| Category | Technology |
|---|---|
| LLM | OpenAI GPT-4, GPT-4 Vision |
| Framework | LangChain (agents, RAG, memory) |
| Vector DB | ChromaDB (document embeddings) |
| UI | Gradio (web interface) |
| PDF Processing | Docling, PyPDF |
| Image Processing | PIL, scikit-image, tifffile |
| Language | Python 3.10+ |
| Feature | AI Scientist | Image Analyst | Paper Reviewer |
|---|---|---|---|
| Text Q&A | ✅ | ✅ | ✅ |
| Image Upload | ❌ | ✅ | ❌ |
| PDF Upload | ❌ | ❌ | ✅ |
| RAG Retrieval | ✅ | ✅ | ✅ |
| Vision Model | ❌ | ✅ | ❌ |
| Workflow Design | ❌ | ✅ | ❌ |
| Paper Critique | ❌ | ❌ | ✅ |
Contributions are welcome! Future agent ideas:
MIT License - feel free to use and modify for your research!
Questions? Issues? Open an issue or reach out to the maintainers! I am also open to new ideas!
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 1.0.0 | 16 Dec 2025 | 32 |
This describes our collected data; it is not a security assessment.
Shared repository data · GitHub
Observed since 21 Oct, 10:01 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:15f4cf4dac8f0d73c2aaf2a3ccd078bc5b8ef684aac5475819df614a6cd5a04b