Skip to main content

Physics question processing library and CLI - classification, LaTeX extraction, variant generation

Project description

VBAgent

A multi-agent library and CLI for processing physics, chemistry, and mathematics question images. Supports classification, LaTeX extraction, TikZ diagram generation, solution generation, variant creation, paper orchestration, and LaTeX compilation.

๐Ÿ“š Documentation | ๐Ÿ› Issues | ๐Ÿ’ฌ Discussions

Installation

pip install -e ".[dev]"

Requirements

  • Python 3.12+
  • API key for your provider (set as env variable)
  • For compilation: pdflatex (TeX Live or MacTeX)

Supported Providers

Provider Env Variable Models
OpenAI OPENAI_API_KEY gpt-5.5, gpt-5.5-mini, gpt-5.4, gpt-5.4-mini, gpt-5.2, gpt-5.1, gpt-5.1-codex
xAI XAI_API_KEY grok-4, grok-4-1-fast-reasoning, grok-3, grok-3-mini
Google GOOGLE_API_KEY gemini-2.5-pro, gemini-2.5-flash, gemini-3-flash-preview

Default Models (OpenAI)

Role Model
Classification, scanning, checking gpt-5.4-mini
Generation (idea, variant, alternate, solution, tikz, fbd) gpt-5.4

Switch provider or model easily:

vbagent config provider xai              # Switch to xAI
vbagent config provider google           # Switch to Google
vbagent config provider openai           # Back to OpenAI
vbagent config set solution -m gpt-5.2   # Override solution model
vbagent config set tikz -m gpt-5.4       # Override tikz model
vbagent config set default -m gpt-5.4    # Change global default

CLI Usage

Quick Start

vbagent init                              # Initialize workspace config
vbagent scan -i question.png -o out.tex   # Extract LaTeX
vbagent classify -i question.png          # Classify question type
vbagent tikz -i diagram.png -o diag.tex   # Generate TikZ
vbagent run -i question.png               # Full pipeline

Commands

Section Command Description
Core run Full pipeline: classify โ†’ scan โ†’ tikz โ†’ solve
Core scan Extract LaTeX from question image
Core classify Classify question type
Core batch Batch process multiple images with resume
Generate tikz Generate TikZ/PGF diagrams
Generate fbd Free body diagram generation
Generate idea Extract physics concepts
Generate alternate Generate alternate solutions
Generate variant Generate problem variants
Generate convert Convert between question formats
Quality check QA review with interactive approval
Quality compile Compile LaTeX to PDF
Manage init Initialize workspace config
Manage config Configure models, providers, settings
Manage ref Manage reference context files
Manage cache Cache management
Manage db SQLite question bank
Manage metadata Question bank metadata
Manage export Export LaTeX (flat, structured, project)
Manage dpp Daily Practice Problem sets
Manage util File utilities (rename, count, clean)
Manage extans Extract answers from LaTeX
Manage screenshot Screenshot utilities
Interface chat Interactive conversational interface
Interface mcp MCP server for external agents
Paper paper Paper orchestration (init, generate, solve, hint, compile, export)

Paper Orchestrator

End-to-end paper generation workflow:

# Initialize a paper project
vbagent paper init physics --title "JEE Advanced 2025" --problems 4

# Generate problems from syllabus topics
vbagent paper generate /path/to/paper/

# Generate solutions for all problems
vbagent paper solve /path/to/paper/

# Generate hints
vbagent paper hint /path/to/paper/

# Compile to main.tex (stitches problems + solutions + hints + ideas + remarks)
vbagent paper compile /path/to/paper/

# Compile only solutions
vbagent paper compile /path/to/paper/ --only solutions

# Compile only hints
vbagent paper compile /path/to/paper/ --only hints

# Export zip for Overleaf
vbagent paper export /path/to/paper/

Paper directory structure:

paper_dir/
โ”œโ”€โ”€ manifest.yaml          # Paper config (subject, title, problems)
โ”œโ”€โ”€ main.tex               # Compiled output
โ”œโ”€โ”€ scans/                 # Per-problem .tex files (problem + solution + hint + idea + remark)
โ”‚   โ”œโ”€โ”€ Problem_1.tex
โ”‚   โ”œโ”€โ”€ Problem_2.tex
โ”‚   โ””โ”€โ”€ ...
โ”œโ”€โ”€ solutions/             # Raw solution .tex files
โ”œโ”€โ”€ hints/                 # Raw hint .tex files
โ””โ”€โ”€ paper_export.zip       # Overleaf-ready zip

Configuration

vbagent config show                       # Show all agent configs
vbagent config models                     # List available models
vbagent config provider                   # Show current provider
vbagent config provider xai               # Switch to xAI (auto-applies model group)
vbagent config provider openai            # Switch back to OpenAI
vbagent config set scanner -m gpt-5.4     # Override scanner model
vbagent config set default -m gpt-5.4     # Change global default
vbagent config model-group                # List all model groups
vbagent config model-group openai         # Apply OpenAI model group
vbagent config subject chemistry          # Set subject
vbagent config debug on                   # Enable debug mode
vbagent config reset                      # Reset to defaults

Config hierarchy: global (~/.config/vbagent/models.json) โ†’ workspace (.vbagent.json).

Supported Question Types

  • mcq_sc โ€” MCQ Single Correct
  • mcq_mc โ€” MCQ Multiple Correct
  • assertion_reason โ€” Assertion-Reason
  • match โ€” Match the Following (matrix match with codes)
  • passage โ€” Passage/Comprehension (paragraph MCQ)
  • integer โ€” Integer type (\ansint{N})
  • subjective โ€” Subjective/Numerical

Project Structure

vbagent/
โ”œโ”€โ”€ __init__.py                          # Public API with lazy imports
โ”œโ”€โ”€ config.py                            # Configuration (models, providers, subjects)
โ”œโ”€โ”€ compile.py                           # LaTeX compilation, validation, verbose debug
โ”œโ”€โ”€ cache.py                             # Pipeline cache (solutions, hints, problems)
โ”œโ”€โ”€ tex.py                               # TeX formatting utilities (format_tex, center_wrap_tikz)
โ”‚
โ”œโ”€โ”€ cli/                                 # CLI commands (Click-based, lazy-loaded)
โ”‚   โ”œโ”€โ”€ main.py                          # Entry point with SectionedGroup
โ”‚   โ”œโ”€โ”€ common.py                        # Shared utilities (panels, prompts, formatting)
โ”‚   โ”œโ”€โ”€ core/
โ”‚   โ”‚   โ”œโ”€โ”€ init.py                      # Workspace initialization
โ”‚   โ”‚   โ”œโ”€โ”€ classify.py                  # Classification command
โ”‚   โ”‚   โ”œโ”€โ”€ scan.py                      # LaTeX extraction command
โ”‚   โ”‚   โ”œโ”€โ”€ process.py                   # Full pipeline command
โ”‚   โ”‚   โ””โ”€โ”€ batch.py                     # Batch processing command
โ”‚   โ”œโ”€โ”€ generation/
โ”‚   โ”‚   โ”œโ”€โ”€ tikz.py                      # TikZ generation command
โ”‚   โ”‚   โ”œโ”€โ”€ fbd.py                       # FBD generation command
โ”‚   โ”‚   โ”œโ”€โ”€ idea.py                      # Concept extraction command
โ”‚   โ”‚   โ”œโ”€โ”€ alternate.py                 # Alternate solutions command
โ”‚   โ”‚   โ”œโ”€โ”€ variant.py                   # Variant generation command
โ”‚   โ”‚   โ””โ”€โ”€ convert.py                   # Format conversion command
โ”‚   โ”œโ”€โ”€ quality/
โ”‚   โ”‚   โ””โ”€โ”€ check.py                     # QA review command
โ”‚   โ”œโ”€โ”€ compilation/
โ”‚   โ”‚   โ””โ”€โ”€ compile_main.py              # LaTeX compile command + preamble
โ”‚   โ”œโ”€โ”€ management/
โ”‚   โ”‚   โ”œโ”€โ”€ config.py                    # Config management (provider, model-group, set)
โ”‚   โ”‚   โ”œโ”€โ”€ ref.py                       # Reference management
โ”‚   โ”‚   โ”œโ”€โ”€ db.py                        # Database management
โ”‚   โ”‚   โ”œโ”€โ”€ metadata.py                  # Metadata management
โ”‚   โ”‚   โ”œโ”€โ”€ export.py                    # Export command
โ”‚   โ”‚   โ”œโ”€โ”€ dpp.py                       # DPP command
โ”‚   โ”‚   โ”œโ”€โ”€ extans.py                    # Answer extraction
โ”‚   โ”‚   โ”œโ”€โ”€ screenshot.py                # Screenshot utilities
โ”‚   โ”‚   โ””โ”€โ”€ util.py                      # File utilities
โ”‚   โ”œโ”€โ”€ cache/
โ”‚   โ”‚   โ””โ”€โ”€ cache_commands.py            # Cache management commands
โ”‚   โ”œโ”€โ”€ interfaces/
โ”‚   โ”‚   โ”œโ”€โ”€ chat.py                      # Chat interface
โ”‚   โ”‚   โ”œโ”€โ”€ mcp.py                       # MCP server
โ”‚   โ”‚   โ””โ”€โ”€ ui.py                        # UI helpers
โ”‚   โ””โ”€โ”€ paper/
โ”‚       โ””โ”€โ”€ paper_commands.py            # Paper orchestrator CLI (init, generate, solve, hint, compile, export)
โ”‚
โ”œโ”€โ”€ agents/                              # AI agent implementations
โ”‚   โ”œโ”€โ”€ base.py                          # Base agent (create, run, encode image)
โ”‚   โ”œโ”€โ”€ classifier.py                    # Question type classifier (v1)
โ”‚   โ”œโ”€โ”€ classification/                  # Multi-agent classification system
โ”‚   โ”‚   โ”œโ”€โ”€ unified_classifier.py        # Unified classifier
โ”‚   โ”‚   โ”œโ”€โ”€ image_classifier.py          # Image classification
โ”‚   โ”‚   โ”œโ”€โ”€ diagram_analyzer.py          # Diagram analysis
โ”‚   โ”‚   โ”œโ”€โ”€ difficulty_assessor.py       # Difficulty assessment
โ”‚   โ”‚   โ”œโ”€โ”€ latex_classifier.py          # LaTeX classification
โ”‚   โ”‚   โ”œโ”€โ”€ idea_generator.py            # Idea-to-problem generator
โ”‚   โ”‚   โ”œโ”€โ”€ problem_combiner.py          # Multi-problem combiner
โ”‚   โ”‚   โ”œโ”€โ”€ taxonomy_classifier.py       # Taxonomy classification
โ”‚   โ”‚   โ”œโ”€โ”€ subject_detector.py          # Subject auto-detection
โ”‚   โ”‚   โ””โ”€โ”€ schema_builder.py            # Schema builder
โ”‚   โ”œโ”€โ”€ content_generation/
โ”‚   โ”‚   โ”œโ”€โ”€ scanner.py                   # LaTeX extraction agent
โ”‚   โ”‚   โ”œโ”€โ”€ alternate.py                 # Alternate solution agent
โ”‚   โ”‚   โ”œโ”€โ”€ converter.py                 # Format converter agent
โ”‚   โ”‚   โ”œโ”€โ”€ idea.py                      # Concept extractor agent
โ”‚   โ”‚   โ””โ”€โ”€ solution/
โ”‚   โ”‚       โ””โ”€โ”€ __init__.py              # Solution agent (routes by subject ร— question_type)
โ”‚   โ”œโ”€โ”€ diagram/                         # TikZ diagram agents
โ”‚   โ”‚   โ”œโ”€โ”€ base.py                      # Base diagram agent (600s timeout, style discipline)
โ”‚   โ”‚   โ”œโ”€โ”€ tikz.py                      # Generic TikZ agent
โ”‚   โ”‚   โ”œโ”€โ”€ tikz_router.py              # TikZ agent routing
โ”‚   โ”‚   โ”œโ”€โ”€ tikz_checker.py             # TikZ validation agent
โ”‚   โ”‚   โ”œโ”€โ”€ mcq_option_coordinator.py   # MCQ option diagram coordinator
โ”‚   โ”‚   โ”œโ”€โ”€ physics/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ fbd.py                   # Free body diagram
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ circuit.py               # Circuit diagram
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ graph.py                 # Physics graph
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ optics.py               # Optics diagram
โ”‚   โ”‚   โ”œโ”€โ”€ chemistry/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ organic_structure.py     # Organic structure
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ organic_orchestrator.py  # Organic multi-step orchestrator
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ organic_simple.py        # Simple organic
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ organic_complex.py       # Complex organic
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ organic_functional.py    # Functional group
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ organic_mechanism.py     # Reaction mechanism
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ organic_multistep.py     # Multi-step synthesis
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ organic_stereo.py        # Stereochemistry
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ chemical_equation.py     # Chemical equation
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ energy_diagram.py        # Energy diagram
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ lewis_structure.py       # Lewis structure
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ orbital.py              # Orbital diagram
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ reaction_mechanism.py    # Reaction mechanism
โ”‚   โ”‚   โ””โ”€โ”€ mathematics/
โ”‚   โ”‚       โ”œโ”€โ”€ coordinate_geometry.py   # Coordinate geometry
โ”‚   โ”‚       โ”œโ”€โ”€ function_graph.py        # Function graph
โ”‚   โ”‚       โ”œโ”€โ”€ geometric_figure.py      # Geometric figure
โ”‚   โ”‚       โ”œโ”€โ”€ number_line.py           # Number line
โ”‚   โ”‚       โ””โ”€โ”€ venn_diagram.py          # Venn diagram
โ”‚   โ”œโ”€โ”€ orchestration/
โ”‚   โ”‚   โ”œโ”€โ”€ problem_orchestrator.py      # Problem orchestrator
โ”‚   โ”‚   โ””โ”€โ”€ solution_orchestrator.py     # Solution orchestrator
โ”‚   โ”œโ”€โ”€ quality/
โ”‚   โ”‚   โ”œโ”€โ”€ base.py                      # Base quality agent
โ”‚   โ”‚   โ”œโ”€โ”€ reviewer.py                  # QA reviewer
โ”‚   โ”‚   โ”œโ”€โ”€ solution_checker.py          # Solution checker
โ”‚   โ”‚   โ”œโ”€โ”€ grammar_checker.py           # Grammar checker
โ”‚   โ”‚   โ”œโ”€โ”€ clarity_checker.py           # Clarity checker
โ”‚   โ”‚   โ”œโ”€โ”€ format_checker.py            # Format checker
โ”‚   โ”‚   โ””โ”€โ”€ latex_fixer.py              # LaTeX fixer
โ”‚   โ”œโ”€โ”€ variants/
โ”‚   โ”‚   โ”œโ”€โ”€ variant.py                   # Single variant generator
โ”‚   โ”‚   โ”œโ”€โ”€ cross_topic.py              # Cross-topic variant
โ”‚   โ”‚   โ””โ”€โ”€ multi_context_variant.py    # Multi-context variant
โ”‚   โ”œโ”€โ”€ selection/
โ”‚   โ”‚   โ””โ”€โ”€ selector.py                 # Problem selector
โ”‚   โ””โ”€โ”€ metadata/
โ”‚       โ””โ”€โ”€ enricher.py                 # Metadata enricher
โ”‚
โ”œโ”€โ”€ prompts/                             # LLM prompt templates
โ”‚   โ”œโ”€โ”€ classification/
โ”‚   โ”‚   โ”œโ”€โ”€ classifier.py                # Base classifier prompt
โ”‚   โ”‚   โ”œโ”€โ”€ unified_classifier.py        # Unified classifier prompt
โ”‚   โ”‚   โ”œโ”€โ”€ diagram_analyzer.py          # Diagram analyzer prompt
โ”‚   โ”‚   โ”œโ”€โ”€ idea_generator.py            # Idea generator prompt
โ”‚   โ”‚   โ”œโ”€โ”€ problem_combiner.py          # Problem combiner prompt
โ”‚   โ”‚   โ”œโ”€โ”€ question_types.py            # Question type definitions
โ”‚   โ”‚   โ””โ”€โ”€ taxonomy.py                  # Taxonomy definitions
โ”‚   โ”œโ”€โ”€ content_generation/
โ”‚   โ”‚   โ”œโ”€โ”€ alternate.py                 # Alternate solution prompt
โ”‚   โ”‚   โ”œโ”€โ”€ converter.py                 # Converter prompt
โ”‚   โ”‚   โ”œโ”€โ”€ idea.py                      # Idea extraction prompt
โ”‚   โ”‚   โ”œโ”€โ”€ scanner/                     # Scanner prompts (per subject ร— question type)
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ _shared.py               # Shared scanner rules
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ physics/
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ common.py            # Physics common rules
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ formatting_rules.py  # Physics formatting
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ mcq_sc.py, mcq_mc.py, subjective.py
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ assertion_reason.py, match.py, passage.py
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ problem_only.py, solution_only.py
โ”‚   โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ __init__.py          # Router
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ chemistry/               # (same structure as physics)
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ mathematics/             # (same structure as physics)
โ”‚   โ”‚   โ””โ”€โ”€ solution/                    # Solution prompts (per subject ร— question type)
โ”‚   โ”‚       โ”œโ”€โ”€ __init__.py              # Top-level router
โ”‚   โ”‚       โ”œโ”€โ”€ physics/
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ common.py            # Physics solution rules
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ mcq_sc.py, mcq_mc.py, subjective.py
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ assertion_reason.py, match.py, passage.py
โ”‚   โ”‚       โ”‚   โ””โ”€โ”€ __init__.py          # Router
โ”‚   โ”‚       โ”œโ”€โ”€ chemistry/               # (same structure as physics)
โ”‚   โ”‚       โ””โ”€โ”€ mathematics/             # (same structure as physics)
โ”‚   โ”œโ”€โ”€ diagram/
โ”‚   โ”‚   โ”œโ”€โ”€ _style_discipline.py         # TikZ style rules (no colors, no inline overrides)
โ”‚   โ”‚   โ”œโ”€โ”€ tikz_checker.py              # TikZ checker prompt
โ”‚   โ”‚   โ”œโ”€โ”€ physics/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ fbd.py, circuit.py, graph.py, optics.py, generic.py
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ __init__.py
โ”‚   โ”‚   โ”œโ”€โ”€ chemistry/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ organic_structure.py, organic_simple.py, organic_complex.py
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ organic_functional.py, organic_mechanism.py, organic_multistep.py
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ organic_stereo.py, chemical_equation.py, energy_diagram.py
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ lewis_structure.py, orbital.py, reaction_mechanism.py
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ __init__.py
โ”‚   โ”‚   โ””โ”€โ”€ mathematics/
โ”‚   โ”‚       โ”œโ”€โ”€ coordinate_geometry.py, function_graph.py, geometric_figure.py
โ”‚   โ”‚       โ”œโ”€โ”€ number_line.py, venn_diagram.py
โ”‚   โ”‚       โ””โ”€โ”€ __init__.py
โ”‚   โ”œโ”€โ”€ quality/
โ”‚   โ”‚   โ”œโ”€โ”€ reviewer.py, solution_checker.py, grammar_checker.py
โ”‚   โ”‚   โ”œโ”€โ”€ clarity_checker.py, format_checker.py
โ”‚   โ”‚   โ””โ”€โ”€ __init__.py
โ”‚   โ”œโ”€โ”€ variants/
โ”‚   โ”‚   โ”œโ”€โ”€ numerical.py, context.py, conceptual.py
โ”‚   โ”‚   โ”œโ”€โ”€ conceptual_calculus.py, cross_topic.py, multi_context.py
โ”‚   โ”‚   โ””โ”€โ”€ __init__.py
โ”‚   โ””โ”€โ”€ subjects/
โ”‚       โ””โ”€โ”€ __init__.py                  # Subject-specific context
โ”‚
โ”œโ”€โ”€ models/                              # Pydantic data models
โ”‚   โ”œโ”€โ”€ classification.py                # Classification models
โ”‚   โ”œโ”€โ”€ content.py                       # Content models
โ”‚   โ”œโ”€โ”€ diagram.py                       # Diagram models
โ”‚   โ”œโ”€โ”€ diff.py                          # Diff models
โ”‚   โ”œโ”€โ”€ metadata.py                      # Metadata models
โ”‚   โ”œโ”€โ”€ orchestration.py                 # Orchestration models
โ”‚   โ”œโ”€โ”€ pipeline.py                      # Pipeline models
โ”‚   โ”œโ”€โ”€ quality.py                       # Quality models
โ”‚   โ”œโ”€โ”€ review.py                        # Review models
โ”‚   โ”œโ”€โ”€ solution.py                      # Solution models
โ”‚   โ”œโ”€โ”€ version_store.py                 # Version store models
โ”‚   โ””โ”€โ”€ workflow.py                      # Workflow models
โ”‚
โ”œโ”€โ”€ paper/                               # Paper orchestrator
โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”œโ”€โ”€ models.py                        # Paper data models
โ”‚   โ”œโ”€โ”€ manifest.py                      # Manifest YAML handling
โ”‚   โ”œโ”€โ”€ syllabus.py                      # Syllabus topic definitions
โ”‚   โ”œโ”€โ”€ generator.py                     # Problem generation
โ”‚   โ”œโ”€โ”€ orchestrator.py                  # Paper orchestrator (compile, export, assemble)
โ”‚   โ””โ”€โ”€ qa.py                            # Paper QA
โ”‚
โ”œโ”€โ”€ pipeline/                            # Processing pipeline
โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”œโ”€โ”€ io.py                            # Pipeline I/O
โ”‚   โ”œโ”€โ”€ runner.py                        # Pipeline runner
โ”‚   โ””โ”€โ”€ stages.py                        # Pipeline stages
โ”‚
โ”œโ”€โ”€ database/                            # SQLite question bank
โ”‚   โ”œโ”€โ”€ store.py                         # QuestionDatabase
โ”‚   โ”œโ”€โ”€ extractor.py                     # ContentExtractor
โ”‚   โ”œโ”€โ”€ reconstructor.py                 # LaTeX reconstruction
โ”‚   โ””โ”€โ”€ metadata_helper.py              # Agent metadata population
โ”‚
โ”œโ”€โ”€ references/                          # Reference context management
โ”‚   โ”œโ”€โ”€ store.py                         # Reference store
โ”‚   โ”œโ”€โ”€ context.py                       # Context builder
โ”‚   โ”œโ”€โ”€ tikz_store.py                    # TikZ reference store
โ”‚   โ””โ”€โ”€ samples/                         # Sample references
โ”‚       โ”œโ”€โ”€ physics/                     # assertion_reason.tex, mcq_mc.tex, mcq_sc.tex, subjective.tex
โ”‚       โ”œโ”€โ”€ chemistry/                   # mcq_mc.tex, mcq_sc.tex, subjective.tex
โ”‚       โ””โ”€โ”€ mathematics/                 # mcq_mc.tex, mcq_sc.tex, subjective.tex
โ”‚
โ”œโ”€โ”€ storage/                             # Content storage
โ”‚   โ”œโ”€โ”€ content_cache.py                 # Content cache
โ”‚   โ””โ”€โ”€ metadata_manager.py             # Metadata manager
โ”‚
โ”œโ”€โ”€ orchestrator/                        # Chat orchestrator
โ”‚   โ”œโ”€โ”€ conversation.py                  # Conversation handler
โ”‚   โ”œโ”€โ”€ tools.py                         # Tool definitions
โ”‚   โ””โ”€โ”€ tool_wrappers.py               # Tool wrappers
โ”‚
โ”œโ”€โ”€ dpp/
โ”‚   โ””โ”€โ”€ builder.py                       # DPP builder
โ”‚
โ”œโ”€โ”€ export/
โ”‚   โ””โ”€โ”€ exporter.py                      # LaTeX exporter
โ”‚
โ”œโ”€โ”€ mcp/
โ”‚   โ””โ”€โ”€ server.py                        # MCP server
โ”‚
โ”œโ”€โ”€ metadata/
โ”‚   โ””โ”€โ”€ store.py                         # Metadata store
โ”‚
โ”œโ”€โ”€ templates/
โ”‚   โ””โ”€โ”€ agentic_context.py              # CONTEXT.md generator
โ”‚
โ”œโ”€โ”€ ui/                                  # Terminal UI
โ”‚   โ”œโ”€โ”€ components.py                    # UI components
โ”‚   โ”œโ”€โ”€ logging.py                       # Logging
โ”‚   โ”œโ”€โ”€ styles.py                        # Styles
โ”‚   โ””โ”€โ”€ tables.py                        # Tables
โ”‚
โ””โ”€โ”€ utils/
    โ”œโ”€โ”€ formatting.py                    # Formatting utilities
    โ””โ”€โ”€ latex.py                         # LaTeX utilities

tests/
โ”œโ”€โ”€ agents/
โ”‚   โ”œโ”€โ”€ classification/                  # test_classification.py, test_database.py, test_models.py, test_router.py
โ”‚   โ”œโ”€โ”€ content_generation/              # test_alternate.py, test_converter.py, test_idea.py, test_scanner.py
โ”‚   โ”œโ”€โ”€ diagram/                         # test_tikz.py
โ”‚   โ”œโ”€โ”€ metadata/                        # test_metadata.py
โ”‚   โ”œโ”€โ”€ orchestration/                   # test_orchestrator.py
โ”‚   โ”œโ”€โ”€ quality/                         # test_review.py
โ”‚   โ”œโ”€โ”€ selection/                       # test_selector.py
โ”‚   โ””โ”€โ”€ variants/                        # test_variant.py
โ”œโ”€โ”€ cli/
โ”‚   โ”œโ”€โ”€ core/                            # test_batch.py, test_process.py
โ”‚   โ”œโ”€โ”€ interfaces/                      # test_chat_cli.py, test_chat_interface.py, test_mcp_server.py
โ”‚   โ””โ”€โ”€ management/                      # test_config.py, test_export_tools.py, test_export.py
โ”œโ”€โ”€ integration/                         # test_context.py, test_dpp_builder.py, test_import_performance.py, ...
โ”œโ”€โ”€ models/                              # test_version_store.py
โ”œโ”€โ”€ paper/                               # test_cli.py, test_generator.py, test_manifest.py, test_models.py, ...
โ”œโ”€โ”€ ui/                                  # test_ui_components.py
โ””โ”€โ”€ utils/                               # test_formatting.py, test_latex.py, test_tex_parser.py

LaTeX Compilation

The -c / --compile flag validates generated LaTeX by compiling with pdflatex. If compilation fails, the compile-fixer agent automatically attempts to fix errors (up to 2 retries).

Compile Preamble

  • fourier[upright] for fonts
  • \everymath{\displaystyle} for display-style math
  • amsmath, amssymb, amsthm, mathtools
  • tikz with libraries: calc, decorations, patterns, arrows.meta, positioning, shapes, intersections, angles, quotes
  • circuitikz (american style), pgfplots (compat=1.18)
  • tasks (MCQ options), enumitem
  • mhchem, chemfig (chemistry only)
  • Auto-detected packages from .tex file content

Environment Definitions

Environment Color Symbol
solution red $\Rightarrow$
alternatesolution blue $\Rrightarrow$
hint maroon $\looparrowright$
idea violet $\diamond$
remark teal $\circ$

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vbagent-0.3.10.tar.gz (655.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vbagent-0.3.10-py3-none-any.whl (938.7 kB view details)

Uploaded Python 3

File details

Details for the file vbagent-0.3.10.tar.gz.

File metadata

  • Download URL: vbagent-0.3.10.tar.gz
  • Upload date:
  • Size: 655.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.2 CPython/3.12.12 Darwin/25.3.0

File hashes

Hashes for vbagent-0.3.10.tar.gz
Algorithm Hash digest
SHA256 b5a94dd436017bdb5b74c5221e28a9919ee0e5d349f33703d5f7ee0309fbd133
MD5 b20150c818993317c41423fcd12d9e1c
BLAKE2b-256 fa1868e649e030b638d5208cb7e698734e4d6ed6afc5f63e8f95d064debfea8b

See more details on using hashes here.

File details

Details for the file vbagent-0.3.10-py3-none-any.whl.

File metadata

  • Download URL: vbagent-0.3.10-py3-none-any.whl
  • Upload date:
  • Size: 938.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.2 CPython/3.12.12 Darwin/25.3.0

File hashes

Hashes for vbagent-0.3.10-py3-none-any.whl
Algorithm Hash digest
SHA256 89fd61986e391854298ca9c95acd855c0b5245ea724229ec6f60662f45ce816f
MD5 90cac6a16190bae6bdbc29388111464c
BLAKE2b-256 3127e3d05507f568f6b38b5d04c2d060c7091fb7d6c659b29b31da75adc85479

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page