Catalog PyPI
PACKAGE EXPLORERView in registry

ai-coscientist

PyPI

A multi-agent AI framework for collaborative scientific research, implementing tournament-based hypothesis evolution and peer review systems

aiartificialco-scientistgenerationhypothesisintelligencemulti-agentpeerresearchreviewscientificselectionsystemstournament
Versions collected1
Direct dependencies3From release 1.0.0
Last observed21 Oct, 10:19 UTC

README

Version 1.0.0 documentation

AI-CoScientist

AI-CoScientist

Join our Discord Subscribe on YouTube Connect on LinkedIn Follow on X.com

A multi-agent AI framework for collaborative scientific research, implementing the "Towards an AI Co-Scientist" methodology with tournament-based hypothesis evolution, peer review systems, and intelligent agent orchestration.

Features

🧠 Multi-Agent Architecture: Specialized agents for hypothesis generation, peer review, ranking, evolution, and meta-analysis
🏆 Tournament-Based Selection: Elo rating system for hypothesis ranking through pairwise comparisons
📊 Comprehensive Review System: Scientific soundness, novelty, testability, and impact assessment
🔄 Iterative Refinement: Meta-review guided evolution with strategic hypothesis improvement
🎯 Diversity Control: Proximity analysis to maintain hypothesis diversity and reduce redundancy
📈 Execution Metrics: Detailed performance tracking and agent timing analytics
💾 State Persistence: Save and resume research workflows with agent state management
🛡️ Robust Error Handling: Graceful fallbacks and recovery mechanisms for production reliability

Installation

You can install the package using pip:

pip install -e .

Or install dependencies directly:

pip install swarms loguru python-dotenv

Quick Start

from ai_coscientist import AIScientistFramework

# Initialize the AI Co-scientist Framework
ai_coscientist = AIScientistFramework(
    model_name="gpt-4",
    max_iterations=3,
    hypotheses_per_generation=10,
    tournament_size=8,
    evolution_top_k=3,
    verbose=True
)

# Define your research goal
research_goal = "Develop novel approaches for improving reasoning capabilities in large language models"

# Run the research workflow
results = ai_coscientist.run_research_workflow(research_goal)

# Access the results
print(f"Generated {len(results['top_ranked_hypotheses'])} top hypotheses")
for i, hypothesis in enumerate(results['top_ranked_hypotheses'], 1):
    print(f"{i}. {hypothesis['text']}")
    print(f"   Elo Rating: {hypothesis['elo_rating']}")
    print(f"   Win Rate: {hypothesis['win_rate']}%")

Architecture

The AI-CoScientist framework consists of 8 specialized agents:

  • Generation Agent: Creates novel research hypotheses
  • Reflection Agent: Peer review and scientific critique
  • Ranking Agent: Hypothesis ranking and selection
  • Evolution Agent: Hypothesis refinement and improvement
  • Meta-Review Agent: Cross-hypothesis insight synthesis
  • Proximity Agent: Similarity analysis and diversity control
  • Tournament Agent: Pairwise hypothesis comparison
  • Supervisor Agent: Workflow orchestration and planning

Advanced Usage

Custom Configuration

ai_coscientist = AIScientistFramework(
    model_name="claude-3-sonnet",
    max_iterations=5,
    base_path="./custom_states",
    verbose=True,
    tournament_size=12,
    hypotheses_per_generation=15,
    evolution_top_k=5,
)

State Management

# Save agent states
ai_coscientist.save_state()

# Load previous states
ai_coscientist.load_state()

Results Analysis

results = ai_coscientist.run_research_workflow(research_goal)

# Execution metrics
metrics = results['execution_metrics']
print(f"Total time: {results['total_workflow_time']:.2f}s")
print(f"Hypotheses generated: {metrics['hypothesis_count']}")
print(f"Reviews completed: {metrics['reviews_count']}")
print(f"Tournament rounds: {metrics['tournaments_count']}")

# Meta-review insights
insights = results['meta_review_insights']
print("Strategic recommendations:", insights.get('strategic_recommendations'))

Code Quality 🧹

  • make style to format the code
  • make check_code_quality to check code quality (PEP8 basically)
  • black .
  • ruff . --fix

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Documentation

For detailed documentation, see DOCS.md.

Citation

If you use AI-CoScientist in your research, please cite:

@software{ai_coscientist,
  title={AI-CoScientist: A Multi-Agent Framework for Collaborative Scientific Research},
  author={The Swarm Corporation},
  year={2024},
  url={https://github.com/The-Swarm-Corporation/AI-CoScientist}
}

License

MIT License - see LICENSE file for details.

Support

Downloads & popularity

1downloads
1-day window · source-reported counts20 Oct 2026
52.50
2026-07-23: 2 · observed 2026-10-21T12:57:01.9661775Z · period 2026-07-23–2026-07-232026-07-24: 1 · observed 2026-10-21T12:57:01.9661775Z · period 2026-07-24–2026-07-242026-07-27: 3 · observed 2026-10-21T12:57:01.9661775Z · period 2026-07-27–2026-07-272026-07-28: 2 · observed 2026-10-21T12:57:01.9661775Z · period 2026-07-28–2026-07-282026-08-01: 1 · observed 2026-10-21T12:57:01.9661775Z · period 2026-08-01–2026-08-012026-08-02: 1 · observed 2026-10-21T12:57:01.9661775Z · period 2026-08-02–2026-08-022026-08-05: 1 · observed 2026-10-21T12:57:01.9661775Z · period 2026-08-05–2026-08-052026-08-06: 1 · observed 2026-10-21T12:57:01.9661775Z · period 2026-08-06–2026-08-062026-08-09: 1 · observed 2026-10-21T12:57:01.9661775Z · period 2026-08-09–2026-08-092026-08-14: 3 · observed 2026-10-21T12:57:01.9661775Z · period 2026-08-14–2026-08-142026-08-15: 2 · observed 2026-10-21T12:57:01.9661775Z · period 2026-08-15–2026-08-152026-08-17: 2 · observed 2026-10-21T12:57:01.9661775Z · period 2026-08-17–2026-08-172026-08-21: 1 · observed 2026-10-21T12:57:01.9661775Z · period 2026-08-21–2026-08-212026-08-23: 3 · observed 2026-10-21T12:57:01.9661775Z · period 2026-08-23–2026-08-232026-08-24: 5 · observed 2026-10-21T12:57:01.9661775Z · period 2026-08-24–2026-08-242026-08-25: 1 · observed 2026-10-21T12:57:01.9661775Z · period 2026-08-25–2026-08-252026-08-28: 1 · observed 2026-10-21T12:57:01.9661775Z · period 2026-08-28–2026-08-282026-08-31: 1 · observed 2026-10-21T12:57:01.9661775Z · period 2026-08-31–2026-08-312026-09-05: 1 · observed 2026-10-21T12:57:01.9661775Z · period 2026-09-05–2026-09-052026-09-07: 2 · observed 2026-10-21T12:57:01.9661775Z · period 2026-09-07–2026-09-072026-09-15: 2 · observed 2026-10-21T12:57:01.9661775Z · period 2026-09-15–2026-09-152026-09-22: 1 · observed 2026-10-21T12:57:01.9661775Z · period 2026-09-22–2026-09-222026-09-26: 1 · observed 2026-10-21T12:57:01.9661775Z · period 2026-09-26–2026-09-262026-09-27: 1 · observed 2026-10-21T12:57:01.9661775Z · period 2026-09-27–2026-09-272026-09-30: 2 · observed 2026-10-21T12:57:01.9661775Z · period 2026-09-30–2026-09-302026-10-02: 5 · observed 2026-10-21T12:57:01.9661775Z · period 2026-10-02–2026-10-022026-10-05: 1 · observed 2026-10-21T12:57:01.9661775Z · period 2026-10-05–2026-10-052026-10-06: 2 · observed 2026-10-21T12:57:01.9661775Z · period 2026-10-06–2026-10-062026-10-08: 1 · observed 2026-10-21T12:57:01.9661775Z · period 2026-10-08–2026-10-082026-10-09: 1 · observed 2026-10-21T12:57:01.9661775Z · period 2026-10-09–2026-10-092026-10-10: 1 · observed 2026-10-21T12:57:01.9661775Z · period 2026-10-10–2026-10-102026-10-12: 1 · observed 2026-10-21T12:57:01.9661775Z · period 2026-10-12–2026-10-122026-10-13: 1 · observed 2026-10-21T12:57:01.9661775Z · period 2026-10-13–2026-10-132026-10-14: 1 · observed 2026-10-21T12:57:01.9661775Z · period 2026-10-14–2026-10-142026-10-17: 2 · observed 2026-10-21T12:57:01.9661775Z · period 2026-10-17–2026-10-172026-10-18: 1 · observed 2026-10-21T12:57:01.9661775Z · period 2026-10-18–2026-10-182026-10-20: 1 · observed 2026-10-21T12:57:01.9661775Z · period 2026-10-20–2026-10-20
23 Jul20 Oct

pypistats · 37 observations shown. Missing days are unknown. Source category: overall: without mirrors.

View observed values
Date / source periodValueObserved at
2026-10-20 – 2026-10-2012026-10-21T12:57:01.9661775Z
2026-10-18 – 2026-10-1812026-10-21T12:57:01.9661775Z
2026-10-17 – 2026-10-1722026-10-21T12:57:01.9661775Z
2026-10-14 – 2026-10-1412026-10-21T12:57:01.9661775Z
2026-10-13 – 2026-10-1312026-10-21T12:57:01.9661775Z
2026-10-12 – 2026-10-1212026-10-21T12:57:01.9661775Z
2026-10-10 – 2026-10-1012026-10-21T12:57:01.9661775Z
2026-10-09 – 2026-10-0912026-10-21T12:57:01.9661775Z
2026-10-08 – 2026-10-0812026-10-21T12:57:01.9661775Z
2026-10-06 – 2026-10-0622026-10-21T12:57:01.9661775Z
2026-10-05 – 2026-10-0512026-10-21T12:57:01.9661775Z
2026-10-02 – 2026-10-0252026-10-21T12:57:01.9661775Z
2026-09-30 – 2026-09-3022026-10-21T12:57:01.9661775Z
2026-09-27 – 2026-09-2712026-10-21T12:57:01.9661775Z
2026-09-26 – 2026-09-2612026-10-21T12:57:01.9661775Z
2026-09-22 – 2026-09-2212026-10-21T12:57:01.9661775Z
2026-09-15 – 2026-09-1522026-10-21T12:57:01.9661775Z
2026-09-07 – 2026-09-0722026-10-21T12:57:01.9661775Z
2026-09-05 – 2026-09-0512026-10-21T12:57:01.9661775Z
2026-08-31 – 2026-08-3112026-10-21T12:57:01.9661775Z
2026-08-28 – 2026-08-2812026-10-21T12:57:01.9661775Z
2026-08-25 – 2026-08-2512026-10-21T12:57:01.9661775Z
2026-08-24 – 2026-08-2452026-10-21T12:57:01.9661775Z
2026-08-23 – 2026-08-2332026-10-21T12:57:01.9661775Z
2026-08-21 – 2026-08-2112026-10-21T12:57:01.9661775Z
2026-08-17 – 2026-08-1722026-10-21T12:57:01.9661775Z
2026-08-15 – 2026-08-1522026-10-21T12:57:01.9661775Z
2026-08-14 – 2026-08-1432026-10-21T12:57:01.9661775Z
2026-08-09 – 2026-08-0912026-10-21T12:57:01.9661775Z
2026-08-06 – 2026-08-0612026-10-21T12:57:01.9661775Z
2026-08-05 – 2026-08-0512026-10-21T12:57:01.9661775Z
2026-08-02 – 2026-08-0212026-10-21T12:57:01.9661775Z
2026-08-01 – 2026-08-0112026-10-21T12:57:01.9661775Z
2026-07-28 – 2026-07-2822026-10-21T12:57:01.9661775Z
2026-07-27 – 2026-07-2732026-10-21T12:57:01.9661775Z
2026-07-24 – 2026-07-2412026-10-21T12:57:01.9661775Z
2026-07-23 – 2026-07-2322026-10-21T12:57:01.9661775Z

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
1.0.011 Jul 20253

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

ACCESSIBLE
the-swarm-corporation/ai-coscientist

Shared repository data · GitHub

License detected in repository
MIT
License branch / ref
main
Last push
13 Jul 2026
Archived
No
Contributor identities
— · partial collection

Public sponsor counts have not been collected. These signals belong to the repository owner.

Downloads & popularity

31count
Gauge · observed snapshots21 Oct 2026
3115.50
2026-10-21: 31 · observed 2026-10-21T19:53:59.6489079Z
21 Oct21 Oct

github · 1 observations shown. Missing days are unknown.

View observed values
Date / source periodValueObserved at
2026-10-21312026-10-21T19:53:59.6489079Z

Metadata history

Meaningful changes
Current collected state Current

Observed since 21 Oct, 10:19 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:298d6a517108b113c50c6f4924cd9d2ade5278144d2c3ff0daf238c1aacd5b44