by langgenius · v0.0.7
ArXiv, https://arxiv.org.
This community listing does not yet include every recommended support, privacy, pricing, and permission disclosure. Review the available package permissions before installing.
Available inside your emploidai workspace after installation.
Available inside your emploidai workspace after installation.
A powerful Dify plugin for searching and retrieving scientific papers from the ArXiv repository. This plugin enables seamless integration of academic research capabilities into your AI applications.
ArXiv is a free distribution service and open-access archive for scholarly articles in physics, mathematics, computer science, quantitative biology, quantitative finance, statistics, electrical engineering, systems science, and economics. Founded in 1991, it hosts over 2 million research papers and is widely used by researchers worldwide.
From Plugin Marketplace (Recommended)
Manual Installation
# Clone the repository
git clone <your-repo-url>
cd arxiv-plugin
# Sync dependencies
uv sync
Once installed, you can use the ArXiv plugin in three ways:
Add the ArXiv tool to your Agent and interact naturally:
User: "Find recent papers about transformer models in NLP"
Agent: *Uses ArXiv tool to search and summarize results*
Add an ArXiv tool node to your chatflow for automated research workflows.
Integrate ArXiv searches into complex automation pipelines.
Query: "quantum computing machine learning"
Query: "Geoffrey Hinton"
Query: "2103.00020"
Query: "ti:transformer AND cat:cs.CL" # Title contains "transformer" in Computer Science - Computation and Language
Query: "au:Vaswani AND ti:attention" # Author Vaswani with "attention" in title
| Parameter | Type | Default | Description |
|---|---|---|---|
query | string | required | Search query (keywords, author, or ArXiv ID) |
The ArxivAPIWrapper class supports additional configuration:
arxiv = ArxivAPIWrapper(
top_k_results=3, # Number of results to return
ARXIV_MAX_QUERY_LENGTH=300, # Maximum query length
load_max_docs=100, # Maximum documents to load
load_all_available_meta=False, # Include all metadata
doc_content_chars_max=4000 # Maximum content length
)
arxiv-plugin/
├── main.py # Plugin entry point
├── manifest.yaml # Plugin configuration
├── pyproject.toml # Project metadata and Python dependencies
├── uv.lock # Locked dependency versions
├── tools/
│ ├── arxiv_search.py # Main tool implementation
│ └── arxiv_search.yaml # Tool configuration
└── provider/
└── arxiv.yaml # Provider configuration
tools/arxiv_search.py)The core wrapper around the ArXiv API with features:
Dify tool implementation that:
To extend the plugin functionality:
Modify Search Parameters
# In ArxivAPIWrapper.__init__
self.top_k_results = 5 # Increase result count
Add Custom Filtering
# In ArxivAPIWrapper.run()
filtered_results = [r for r in results if some_condition(r)]
Enhance Output Format
# Modify the docs list comprehension
docs = [
f"📅 Published: {result.updated.date()}\n"
f"📄 Title: {result.title}\n"
f"👥 Authors: {', '.join(a.name for a in result.authors)}\n"
f"🔗 URL: {result.entry_id}\n"
f"📝 Summary: {result.summary}"
for result in results
]
run(query: str) -> strPerforms an ArXiv search and returns formatted results.
Parameters:
query: Search query string (max 300 characters)Returns:
Example:
wrapper = ArxivAPIWrapper()
results = wrapper.run("machine learning transformers")
The plugin handles several error scenarios:
| Error Type | Description | Response |
|---|---|---|
ArxivError | General ArXiv API error | "Arxiv exception: {error}" |
UnexpectedEmptyPageError | Empty response from API | "Arxiv exception: {error}" |
HTTPError | Network/HTTP issues | "Arxiv exception: {error}" |
| No results | Query returns no papers | "No good Arxiv Result was found" |
| Empty query | Missing search query | "Please input query" |
# Example test case
def test_arxiv_search():
wrapper = ArxivAPIWrapper(top_k_results=1)
result = wrapper.run("attention is all you need")
assert "Title:" in result
assert "Authors:" in result
We welcome contributions! Here's how to get started:
git checkout -b feature/your-feature-name
This project is licensed under the MIT License - see the LICENSE file for details.
Issue: "No good Arxiv Result was found"
Issue: "Arxiv exception: HTTPError"
Issue: Results are truncated
doc_content_chars_max in the configurationIssue: Tool not appearing in Dify
Enable debug logging for detailed error information:
import logging
logging.basicConfig(level=logging.DEBUG)