Credentials. The interactive run keeps agents running with your inherited environment, including API keys, so use trusted source files only.
Who it is forA paper author who received a generated draft that is mostly right but needs manual layout or label fixes before the final image.
The problemAutomated layouts can misplace a box or label, and the final restyle step should only run once the structure is correct.
The outcomeAn edited full_figure.drawio and an enhanced PNG that reflects the manual changes.
What you need first
- Node 22 or newer
- draw.io desktop CLI on PATH as drawio
- Claude Code CLI (claude) on PATH, since it is the default agent
- OPENAI_API_KEY set in the shell or a .env file
- Python 3.10 or newer (the CLI creates its own cached venv on first run)
Steps
- Install the draw.io desktop CLI and Claude Code CLI as in the install section, and set OPENAI_API_KEY. (inferred, check the README)
autoillustrate examples/ai_scientist_method.tex --prompt "Please make a diagram illustrating the method of our scientific research paper in a single panel. We intend to use it as front-page diagram in our research paper." --interactive(replace the path and prompt with your own) (inferred, check the README)- When the run opens full_figure.drawio in the diagrams.net editor in your browser, make your changes there.
- Press Enter in the terminal to re-export the PNG and continue to the enhance phase.
- On a remote machine, add
--editor-port <port>and usessh -L <port>:127.0.0.1:<port>to reach the editor. (inferred, check the README)
Prompt for your agent
Using the repo SakanaAI/AutoIllustrate, start an interactive run on <path to .tex file> with -i and wait for the editor step. After the user confirms edits, press Enter and verify that figures/full_figure_enhanced.png is written in the run folder.
Caveat. The editor runs on 127.0.0.1, so remote use needs the SSH port forward described in the README.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for SakanaAI/AutoIllustrate and "Hand-edit a generated diagram before the final restyle"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer