Skip to content

gewenbo888/StringTheoryAI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌌 StringTheoryAI

AI-Powered Research Agent for String Theory

Search papers. Explore concepts. Visualize mathematics. Generate reviews.

License: MIT Python 3.10+ arXiv GitHub stars

FeaturesQuick StartAgentsVisualizationsWeb UIExamples


  "Can you explain Calabi-Yau compactification          ┌─────────────┐
   and find the latest papers on it?"                   │   Scholar   │──→ arXiv Search
          │                                              └──────┬──────┘
          ▼                                                     │
   ┌─────────────┐     ┌─────────────┐                 ┌──────▼──────┐
   │  Theorist   │────▶│ Synthesizer │────────────────▶│  Literature │
   │  (LLM)      │     │  (Review)   │                 │   Review    │
   └──────┬──────┘     └─────────────┘                 └─────────────┘
          │
          ▼
   ┌─────────────┐
   │Mathematician│──→ 3D Calabi-Yau Plot
   │ (Compute)   │──→ Worldsheet Animation
   └─────────────┘──→ AdS Space Visualization

What is StringTheoryAI?

StringTheoryAI is an AI research agent that helps physicists, students, and curious minds explore string theory. It combines:

  • Real arXiv integration — search and analyze papers from hep-th, gr-qc, math-ph
  • AI-powered explanations — deep, citation-backed answers from GPT-4o or Claude
  • Mathematical visualizations — interactive 3D plots of Calabi-Yau manifolds, worldsheets, branes, and more
  • Automated literature reviews — synthesize dozens of papers into structured reviews

Built for anyone from graduate students to active researchers.


Features

Feature Description
Paper Search Search arXiv across hep-th, gr-qc, math-ph with AI analysis
Concept Explorer Ask anything about string theory — get rigorous, cited explanations
Concept Cards Structured knowledge cards with equations, related topics, key papers
Compare Concepts Side-by-side comparison of theories, dualities, approaches
Math Visualizations Interactive 3D plots: Calabi-Yau, worldsheets, AdS, branes, tori
Literature Reviews AI-generated research summaries from arXiv papers
Trend Analysis Identify emerging directions across paper collections
Quiz Mode Test your string theory knowledge at any level
Rich CLI Beautiful terminal interface with tables and panels
Streamlit Dashboard Full web UI with interactive plots

Quick Start

Install

pip install stringtheoryai

Or from source:

git clone https://github.com/gewenbo888/StringTheoryAI.git
cd StringTheoryAI
pip install -e ".[all]"

Setup

cp .env.example .env
# Add your OpenAI or Anthropic API key

Use

# Search papers
stringtheory search "AdS/CFT black hole entropy"

# Explain a concept
stringtheory explain "What is T-duality in string theory?"

# Get a structured concept card
stringtheory explain "Calabi-Yau compactification" --concept-card

# Compare concepts
stringtheory compare "Type IIA" "Type IIB"

# Generate visualizations (no API key needed!)
stringtheory visualize calabi-yau
stringtheory visualize all

# Generate a literature review
stringtheory review "holographic entanglement entropy"

# Test your knowledge
stringtheory quiz "supersymmetry" --difficulty graduate

# Launch web dashboard
stringtheory ui

Agents

Scholar (arXiv Search & Analysis)

Searches arXiv and provides AI-powered paper analysis.

from stringtheory.agents.scholar import Scholar
from stringtheory.config import ArxivConfig, LLMConfig

scholar = Scholar(LLMConfig(), ArxivConfig())

# Search
papers = await scholar.search("swampland conjecture")

# Analyze a paper
analysis = await scholar.analyze_paper(papers[0])

# Find related work
related = await scholar.find_related(papers[0])

# Search by author
witten_papers = await scholar.search_by_author("Edward Witten")

Theorist (Concept Explanation)

Deep explanations with mathematical rigor.

from stringtheory.agents.theorist import Theorist

theorist = Theorist(LLMConfig())

# Detailed explanation
explanation = await theorist.explain("What is the AdS/CFT correspondence?")

# Structured concept card
concept = await theorist.get_concept("M-theory")

# Compare approaches
comparison = await theorist.compare("Loop quantum gravity", "String theory")

# Historical trace
history = await theorist.trace_history("The second superstring revolution")

Mathematician (Compute & Visualize)

Mathematical computations and stunning 3D visualizations.

from stringtheory.agents.mathematician import Mathematician

math = Mathematician(LLMConfig(), VisualizationConfig())

# Generate visualizations
math.visualize_calabi_yau(n=5)       # Calabi-Yau manifold
math.visualize_worldsheet(modes=4)    # String worldsheet
math.visualize_torus()                # T² compactification
math.visualize_ads_space()            # Anti-de Sitter space
math.visualize_branes(n_branes=7)     # D-brane stack
math.visualize_extra_dimensions()     # 6D → 3D projection

# Mathematical derivations
derivation = await math.derive("Derive the Polyakov action for the bosonic string")

Synthesizer (Literature Reviews)

Generates research summaries from paper collections.

from stringtheory.agents.synthesizer import Synthesizer

synth = Synthesizer(LLMConfig(), output_dir="output/reviews")

# Generate review
summary = await synth.synthesize(papers, "holographic entanglement")

# Identify trends
trends = await synth.identify_trends(papers)

# Compare approaches
comparison = await synth.compare_approaches(group_a, group_b, "quantum gravity")

Visualizations

StringTheoryAI generates interactive 3D visualizations of key mathematical objects:

Visualization What It Shows
Calabi-Yau Manifold 3D projection of the compact 6D spaces where extra dimensions live
String Worldsheet The 2D surface swept by a vibrating string with oscillation modes
T² Torus Toroidal compactification — the simplest extra-dimension geometry
Anti-de Sitter Space The curved spacetime of AdS/CFT, showing the warp factor
D-Brane Stack Multiple D-branes in transverse space with quantum fluctuations
Extra Dimensions 6 compact dimensions projected into 3D spacetime

Generate all at once:

stringtheory visualize all --format html --resolution 300

Web Dashboard

Launch the full Streamlit interface:

pip install stringtheoryai[ui]
stringtheory ui

Features:

  • Paper search with expandable results and inline analysis
  • Interactive concept explorer with concept cards
  • Real-time 3D visualization generation
  • Literature review generator with markdown download

Project Structure

StringTheoryAI/
├── stringtheory/
│   ├── agents/
│   │   ├── scholar.py       # arXiv search & paper analysis
│   │   ├── theorist.py      # Concept explanation & Q&A
│   │   ├── mathematician.py  # Math computation & visualization
│   │   └── synthesizer.py   # Literature review generation
│   ├── math/
│   │   └── manifolds.py     # Calabi-Yau, worldsheet, AdS computations
│   ├── visualizations/
│   │   └── plotters.py      # Plotly 3D visualization generators
│   ├── config.py            # Pydantic configuration
│   ├── models.py            # Data models (Paper, Concept, etc.)
│   ├── cli.py               # Rich CLI interface
│   └── web.py               # Streamlit web dashboard
├── examples/                 # Usage examples
├── tests/                    # Test suite
└── pyproject.toml

Examples

See the examples/ directory:


Roadmap

  • Multi-agent architecture (Scholar, Theorist, Mathematician, Synthesizer)
  • arXiv integration with hep-th, gr-qc, math-ph
  • 6 interactive 3D visualizations
  • Rich CLI + Streamlit Web UI
  • Literature review generation
  • PDF paper parsing (full-text analysis beyond abstracts)
  • LaTeX equation rendering in terminal
  • Research graph visualization (paper citation networks)
  • Collaborative research notebooks
  • Integration with Semantic Scholar API
  • Fine-tuned models for string theory
  • Automated conjecture generation
  • String landscape exploration tools

Links


Contributing

Contributions welcome! Whether you're a physicist, developer, or both:

  1. Fork the repository
  2. Create your branch: git checkout -b feature/amazing-feature
  3. Run tests: pytest
  4. Submit a pull request

Citation

@software{stringtheoryai2024,
  title={StringTheoryAI: AI-Powered Research Agent for String Theory},
  year={2024},
  url={https://github.com/gewenbo888/StringTheoryAI},
  license={MIT}
}

License

MIT License — see LICENSE.



If string theory has 10^500 vacua, at least one of them has you starring this repo.

Built with arXivOpenAIAnthropicPlotly

About

AI-powered research agent for string theory — arXiv search, concept explanation, 3D math visualizations (Calabi-Yau, worldsheets, AdS), automated literature reviews

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors