Scholes AI
A mathematically accurate technical report writing agent, that creates charts, writes proofs, as well as has a built in compiler to self-validate everything in one place.
Core trick
Agent edits LaTeX files in a browser editor and compiles them in a Vercel Sandbox, using the build result to self-validate output.
Description
A mathematically accurate technical report writing agent, that creates charts, writes proofs, as well as has a built in compiler to self-validate everything in one place. This removes the need for quants to run the papers from scratch and allows for everyone even those who are not mathematically inclined to still be able to research and test markets and mulit-million $ assets using Latex to convert to PDF.
README excerpt
# scholes-ai A minimal LaTeX workspace MVP with: - a chat panel that drives one AI SDK `ToolLoopAgent` - a file tree and in-browser LaTeX editor - a PDF preview fed by the latest compile artifact - a file diff panel for the latest agent write - a Vercel Sandbox-backed compile path ## Setup Install dependencies: ```bash npm install ``` Provide one model credential: ```bash GOOGLE_GENERATIVE_AI_API_KEY=... ``` or ```bash OPENAI_API_KEY=... ``` or ```bash AI_GATEWAY_API_KEY=... ``` Optional model overrides: ```bash GOOGLE_MODEL=gemini-3.1-pro-preview OPENAI_MODEL=gpt-5 SCHOLES_GATEWAY_MODEL=openai/gpt-5 ``` ## Vercel Sandbox Auth The compile tool is wired for Vercel Sandbox. For local development, Vercel documents the recommended flow as: ```bash vercel link vercel env pull ``` That populates `VERCEL_OIDC_TOKEN`, which the Sandbox SDK uses automatically. If you want to use explicit access-token auth instead, set: ```bash VERCEL_TEAM_ID=team_... VERCEL_PROJECT_ID=prj_... VERCEL_TOKEN=... ``` Optional Sandbox settings: ```bash VERCEL_SANDBOX_SNAPSHOT_ID=... VERCEL_SANDBOX_LATEX_COMMAND="latexmk -pdf -interaction=nonstopmode -halt-on-error main.tex" TECTONIC_VERSION=0.15.0 TECTONIC_DOWNLOAD_URL=... ``` Notes: - If `VERCEL_SANDBOX_SNAPSHOT_ID` is set, the app assumes the snapshot already contains a working LaTeX toolchain and defaults to `latexmk`. - If no snapshot is configured, the app bootstraps `tectonic` inside a fresh sandbox and compiles with that inst