Skip to content

Introduction

TeXRA is a multi-agent AI system for rigorous scientific work. Built as a VS Code extension, it orchestrates specialized agents — for literature search, manuscript drafting, figure generation, formal verification, symbolic computation, and result communication — and coordinates them through reproducible workflows where every output is auditable and every citation is grounded.

Install from VS Code Marketplace

Why multi-agent?

The gap between having a result and having a correct, publishable manuscript is where most research time goes. A 40-page paper where notation must be consistent from Definition 2.1 through Appendix C. A bibliography where every entry is real and every \cite key resolves. Commutative diagrams and Feynman diagrams that compile. A literature survey of a field where hundreds of papers appeared this year. A Lean formalization where the proof state needs careful tactic selection.

General-purpose AI tools make this worse, not better:

  • Hallucinated citations. Without grounded search tools, models fabricate references — dangerous in peer-reviewed work, unacceptable in mathematics.
  • Lost structure. Chatbots can't reason across theorem environments, \label/\ref graphs, BibTeX databases, and multi-file projects simultaneously.
  • No verification. You get text output with no way to compile, diff, type-check, or audit what changed.
  • No tool access. A single prompt can't search Mathlib by type signature, run a WolframScript computation, compile TikZ, and verify the result.

Scientific work needs a system of agents — each specialized, each grounded in real tools, each producing verifiable output.

The multi-agent approach

TeXRA solves this with a team of agents that share context and use tools:

Two types of agents

Workflow agents (polish, correct, draw, paper2slide, paper2poster) execute structured pipelines:

  1. Analyze your input files and instructions
  2. Plan and execute changes via LLM calls
  3. Optionally reflect on their output and iterate
  4. Produce versioned output files (*_r0_*, *_r1_*) with diffs

Interactive agents (chat, search, research, presenter) operate conversationally with tool access:

  • Read and edit files across your entire workspace
  • Search arXiv, Crossref, and Zotero for references with verified BibTeX
  • Search Mathlib by type signature (Loogle), inspect Lean proof states, check diagnostics
  • Run WolframScript for symbolic and numerical computation
  • Compile LaTeX and visually verify output
  • Maintain persistent context across multi-turn conversations

Design patterns

The agent system is built on three established AI design patterns:

  1. Reflection — agents examine their own output to identify errors and inconsistencies, running multiple rounds when rigor demands it
  2. Tool use — agents call external tools (compilers, Lean LSP, Loogle, WolframScript, search APIs, file systems) to ground their reasoning in verified data
  3. Planning — agents break complex tasks into steps, execute them sequentially, and adapt based on intermediate results

What you can do

TaskAgentHow it works
Polish a manuscriptpolishRewrites for clarity and precision, preserving all math environments and cross-references. Outputs a reviewable diff.
Fix LaTeX errorscorrectFinds and repairs compilation errors, notation inconsistencies, broken references, and formatting issues across multi-file projects.
Generate figuresdrawCreates TikZ diagrams — commutative diagrams, Feynman diagrams, phase portraits, lattice structures. Compiles and visually verifies every figure.
Search literaturesearchQueries arXiv, Crossref, Zotero. Returns verified citations with BibTeX — no hallucinated references.
Work with Lean 4researchSearch Mathlib theorems via Loogle by type signature, inspect proof states, check diagnostics, manage builds and cache.
Symbolic computationresearchRun WolframScript to evaluate integrals, check identities, simplify expressions, or verify numerical results.
Build slide deckspresenterReads your paper, drafts a Beamer deck that preserves logical structure — definitions before theorems, diagrams in TikZ. Compiles and checks every page.
General researchresearchOpen-ended agent with full tool access for any research task.
Convert formatspaper2slide, paper2posterTransform papers into presentations or posters.

Who uses TeXRA

  • Mathematicians writing papers with complex theorem environments, maintaining notation consistency across long proofs, formalizing results in Lean 4
  • Theoretical physicists managing multi-file manuscripts with extensive equation environments, Feynman diagrams, and large bibliographies
  • Computational scientists producing papers that combine numerical methods, algorithm descriptions, convergence plots, and reproducible workflows
  • PhD students maintaining consistency across thesis chapters, surveying literature in a new subfield, preparing seminar talks from written work
  • Research groups collaborating on papers where every change needs to be traceable and auditable by co-authors and referees

Privacy and data handling

All API calls go directly from your machine to the model provider you choose (Anthropic, OpenAI, Google, etc.). TeXRA does not operate intermediate servers. Your unpublished proofs, manuscripts, and API keys never leave your machine except to the provider endpoint.

API keys are stored in VS Code's built-in Secret Storage.

Next steps

If you spot a bug, email contact@texra.ai or open an issue on GitHub.