First run
You have TeXRA installed. This page walks you through running one agent — polish — on a real .tex file. About five minutes, side-by-side for the extension and the CLI.
If you don't have TeXRA yet, see Installation.
What you'll do
- Get a sample
.texfile. - Run the
polishagent with one instruction. - Read the diff.
Get a sample file
If you already have a draft you want to polish, skip this step. Otherwise:
In VS Code
Open the command palette (Ctrl+Shift+P / Cmd+Shift+P) and run TeXRA: Create Sample Project. This drops a ready-to-run workspace at texra-sample/draft.tex.
In the terminal
Any .tex file works. If you want a quick test file:
cat > draft.tex <<'EOF'
\documentclass{article}
\begin{document}
The proposed method achieves significant improvements over the baseline,
which is something that is very important for the field, and we will
demonstrate this in the following sections through various experiments.
\end{document}
EOFRun polish
In VS Code
- Open
draft.tex. - Click the TeXRA icon in the activity bar.
- In the Input section, click Add files and pick
draft.texfrom the file picker. - Pick polish under Agent. Pick sonnet46T under Model (or any available model).
- Type an instruction:
Tighten the prose. Preserve all math and citations.
- Press Execute.
The Progress Board opens and streams the run. When it finishes, a diff icon appears on the completed stream — click it to see what changed.
In the terminal
texra run polish \
--input draft.tex \
--instruction "Tighten the prose. Preserve all math and citations."The run streams reasoning, tool calls, and the assembled output. When it completes, polish has written one folder per round under .texra/runs/<run-id>/:
<run-id>/r0/first revisiondraft.texreads draft.tex, applies your instruction
r1/critique pass · finaldraft.texrereads r0, revises again
draft.polished.tex--outputwritten next to your input insteadEach round lands in its own folder and keeps the input filename — r0/draft.tex is the first revision, r1/draft.tex the critique pass and final. Add --output draft.polished.tex to write the result next to your input instead.
To diff against your original:
diff -u draft.tex .texra/runs/<run-id>/r1/draft.texWhat just happened
Polish ran two passes: a first revision, then a critique pass that rereads its own output and revises again.
Reads draft.tex, applies your instruction, writes the first revision.
Rereads its own Round 0 output, then revises again.
Polish is a two-pass workflow: Round 0 drafts from your instruction, Round 1 critiques its own output against a fixed checklist and revises into r1/draft.tex.
Workflow agents like polish do not call tools. They read input, run their pipeline, and write a diff. The next step up — tool-use agents — can read across your project, search literature, compile LaTeX, and verify their work; see Built-in Agents.
Next steps
- Polish a draft — the workflow in depth: rounds, limits, multi-file projects
- Built-in Agents — the full catalog, including
correct,research,review, andlean - Models — choosing a model that matches the work
- TeXRA CLI — sign-in, workspace defaults, headless output formats
- LaTeX Diff — compiled PDF comparison of revisions