Replace the flat "run 17 adapters in parallel and sum" design with a collaborative, layered blackboard MoA where the backend engines compose: agents declare produces/consumes typed artifacts, a scheduler topologically orders them into layers, and each layer commits its artifacts to a shared blackboard before the next runs — so downstream agents genuinely build on upstream findings. Composition core (lib/moa): - types.ts: MoaAgent contract (produces/consumes/gate/run(ctx,bb)) + typed artifact taxonomy (source_labels, effect_sizes, quality, relevance, contested, entities, mechanisms, design_priors, sufficiency, debate, research_brief) - blackboard.ts: typed single-producer-per-kind shared memory - scheduler.ts: dependency-DAG layering; parallel within a layer, artifacts committed between layers - router.ts + planner.ts: deterministic gate + advisory Claude planner (boosts never revive a 0 gate) - aggregate.ts: deterministic vote mix -> verdict + trust (no LLM; the moat) - synthesize.ts: grounded Claude narrative (explains, never decides) - 21 composing agents under lib/moa/agents/* Real composition edges proven live: MiniCheck produces source_labels -> MultiVerS aggregates them + Valsci produces contested -> STORM debates; quant-extractor produces effect_sizes -> PyMARE pools them; paper-qa quality + Loki relevance feed MiniCheck. Sample (EMPA-REG vs DECLARE) yields a calibrated "supported, trust 73/100" with an honest heterogeneity caveat. New production engines from vendored research repos (MVP -> production), wired as Layer-3 deliberation agents with papertrail_*.py + PAPERTRAIL.md: - autoreview (eimenhmdt/autoresearcher): citation-grounded literature review - autogather (lucereal/AutoResearcher): query-gen + coverage-gap analysis - autoloop (karpathy/autoresearch pattern): bounded evidence-refinement loop Platform robustness: callClaudeForJson now tolerates prose-wrapped JSON (balanced-value extraction) with one stricter retry — fixes model editorializing that previously broke MiniCheck and any strict-JSON engine. API /api/moa/orchestrate + console page /console/orchestrator visualizing the layered DAG, artifact provenance, and per-agent produce/consume.
101 lines
3.3 KiB
Markdown
101 lines
3.3 KiB
Markdown
# 🤖🧪 AutoResearcher
|
|
|
|
---
|
|
|
|
⚡ Automating scientific workflows with AI ⚡
|
|
|
|
<a href="https://github.com/eimenhmdt/autoresearcher/"></a>
|
|
[](https://discord.gg/PnQDR5h9)
|
|
|
|
---
|
|
|
|
## What is AutoResearcher?
|
|
|
|
AutoResearcher is an open-source Python package that leverages AI models and external knowledge sources to automate scientific workflows. Designed to help researchers and scientists accelerate their research process and increase efficiency, AutoResearcher is a powerful tool for the modern scientific community.
|
|
|
|
Please note that the project is currently in its early prototype stage and under active development. Its present functionality is limited to conducting literature reviews, but the ultimate goal is to create a tool capable of driving scientific discovery on autopilot.
|
|
|
|
If this vision excites you, we invite you to contribute to the project. Start by joining our [Discord server](https://discord.gg/jUMfu4D4je) and discussing your ideas with our community.
|
|
|
|
## Documentation
|
|
|
|
Documentation for the package is available [here](https://eimenhmdt.github.io/autoresearcher/).
|
|
|
|
## Installation
|
|
|
|
Install the package using pip:
|
|
|
|
```bash
|
|
pip install autoresearcher
|
|
```
|
|
|
|
## Setting Environment Variables
|
|
|
|
Before using the package, you need to set the following environment variables:
|
|
|
|
- `OPENAI_API_KEY`: Your OpenAI API key for accessing the GPT-based AI models.
|
|
- `EMAIL`: An email address of your choice (used to identify your API requests for getting citations).
|
|
|
|
You can set the environment variables in your operating system or in your Python script using the `os` module:
|
|
|
|
```python
|
|
import os
|
|
|
|
os.environ["OPENAI_API_KEY"] = "<your_openai_api_key>"
|
|
os.environ["EMAIL"] = "<your_email>"
|
|
```
|
|
|
|
Replace <your_openai_api_key> and <your_email> with your actual API key and email address.
|
|
|
|
## Usage
|
|
|
|
1. Import the literature_review function from the package:
|
|
|
|
```python
|
|
from autoresearcher import literature_review
|
|
```
|
|
|
|
2. Set your research question as a string:
|
|
|
|
```python
|
|
research_question = "What is the best way to train a neural network?"
|
|
```
|
|
|
|
3. Create a literature_review instance with your research question and execute it:
|
|
|
|
```python
|
|
researcher = literature_review(research_question)
|
|
```
|
|
|
|
You can also pass an output file name as a .txt file:
|
|
|
|
```python
|
|
researcher = literature_review(research_question, output_file="my_literature_review.txt")
|
|
```
|
|
|
|
This will generate a literature review based on the research question.
|
|
|
|
Also, you can run it in one command:
|
|
|
|
```python
|
|
python run_autorsearcher.py --research_question "<your_research_question>" --output_file "<your_output_file>"
|
|
```
|
|
|
|
4. To use GPT-4o instead of the default GPT-4o-mini, set the `use_gpt4` parameter to `True`:
|
|
|
|
```python
|
|
researcher = literature_review(research_question, use_gpt4=True)
|
|
```
|
|
|
|
Note that using GPT-4o may result in higher costs and potentially longer processing times.
|
|
|
|
## Contributing
|
|
|
|
We welcome contributions! Feel free to submit issues or create pull requests. Together, let's revolutionize science! 🚀
|
|
|
|
## License
|
|
|
|
This project is licensed under the MIT License. See the LICENSE file for details.
|
|
|
|
Made with ☕ by [@eimenhamedat](https://twitter.com/eimenhmdt)
|