How taewooopark/maglab works
MagLab is an AI-for-Science harness for magnetism and spintronics. Researchers enter through the CLI or interactive REPL; the orchestration layer uses configurable LLM backends and deterministic domain tools to coordinate research tasks, then supports inspection, provenance, and publication-ready outputs. Major branches include literature search, physics and simulation, analysis, figures, instrument workflows, lab memory, review, and authoring. The README documents these capabilities; sampled source confirms selected orchestration, LLM, simulation, and storage behavior, so some documented subsystem links are shown as unverified.
Main entry points: orchestrator.py Research Orchestrator · tools.py Scientific Tools · authoring Writing and Presentations · p6_authoring.py Authoring Commands
Components 29
Research Entry
- CLI
maglab/cli.py - Interactive REPL
maglab/repl.py
AI Harness
- Research Orchestrator
maglab/core/orchestrator.py - Configuration
maglab/config.py - LLM Backends
maglab/llm/base.py - Scientific Tools
maglab/llm/tools.py - Skills
maglab/core/skills.py - Subagents
maglab/core/subagents.py - Budget Tracking
maglab/core/budget.py - Task Manifest
maglab/core/manifest.py
Scientific Workflows
- Physics and Materials
maglab/physics/oracle.py - Multiscale Simulation
maglab/sim/pipeline.py - Effect Fitting
maglab/analysis/effects - Literature Search
maglab/literature/rag.py - Figure Generation
maglab/figure
Lab Operations
- Instrument Workflows
maglab/instrument - Lab Notebook
maglab/lab/notebook - Experiment Planning
maglab/lab/planning - Provenance
maglab/provenance - Messaging Gateway
maglab/gateway/runner.py - Workspace
maglab/workspace.py - Durable File Writes
maglab/core/atomic.py
Research Outputs
- Manuscript Review
maglab/reviewer - Integrity Gate
maglab/report/honesty_gate.py - Writing and Presentations
maglab/authoring - Authoring Commands
maglab/commands/p6_authoring.py - Research Data Vault
maglab/authoring/data_vault.py - Presentation Catalog
maglab/authoring/present/catalog.py
Other components
- Researcher
Connections 29
- Researcher → CLI: runs commands
README.md - Researcher → Interactive REPL: starts research
README.md - CLI → Research Orchestrator: dispatches tasks
maglab/cli.py - Interactive REPL → Research Orchestrator: submits turns
README.md - Research Orchestrator → LLM Backends: requests completions
maglab/core/orchestrator.py - Research Orchestrator → Scientific Tools: executes tools
maglab/core/orchestrator.py - Research Orchestrator → Budget Tracking: records usage
maglab/core/orchestrator.py - Research Orchestrator → Task Manifest: loads task plans
maglab/core/orchestrator.py - Research Orchestrator → Configuration: loads settings
maglab/core/orchestrator.py - Research Orchestrator → Skills: uses capabilities
- Research Orchestrator → Subagents: delegates work
- Scientific Tools → Physics and Materials: invokes calculations
- Scientific Tools → Multiscale Simulation: invokes simulations
- Researcher → Literature Search: searches evidence
README.md - Researcher → Effect Fitting: fits measurements
README.md - Researcher → Figure Generation: creates figures
README.md - Researcher → Instrument Workflows: prepares experiments
README.md - Researcher → Lab Notebook: records notes
README.md - Researcher → Experiment Planning: plans measurements
README.md - Multiscale Simulation → Provenance: records results
maglab/sim/pipeline.py - Effect Fitting → Provenance: tracks lineage
README.md - Literature Search → Manuscript Review: supplies corpus context
maglab/reviewer/corpus_rag.py - Manuscript Review → Integrity Gate: supports disclosure
README.md - Authoring Commands → Writing and Presentations: dispatches drafting
maglab/commands/p6_authoring.py - Authoring Commands → Messaging Gateway: controls gateway
maglab/commands/p6_authoring.py - Writing and Presentations → Research Data Vault: reads verified results
maglab/authoring/present/slide_drafter.py - Writing and Presentations → Presentation Catalog: uses slide catalog
maglab/authoring/present/slide_drafter.py - Research Orchestrator → Messaging Gateway: routes interactions
maglab/core/orchestrator.py - Workspace → Durable File Writes: stores durable state