Solutions
Can Antigravity CLI read a PDF?
Updated
Partly: Antigravity reads PDFs through its view_file tool with Gemini models, processing pages as images, while users on Google's forum report the same tool refusing PDFs under Claude models, and the file must be in a trusted folder. Text avoids all three problems. In Forkbench a PDF kept in Files reaches agy as Markdown from read_file, with whichever model you run, without being copied into the workspace.
With a Gemini model, agy can open a PDF in a trusted folder, but it reads the pages as images and the token count climbs. Switch the model to Claude and users report the same file failing with "cannot read pdf files". Either way, the PDF has to sit in a folder you trusted the agent with.
Reading a page as an image is the expensive way to get at text that is already in the file. Extracted once on your Mac, the text is a fraction of the size, and the agent pages through it instead of loading the whole document. Because the document stays in Files rather than in the trusted workspace, trusting a folder for the code does not also hand the agent every document sitting next to it.
How it works
- 1Run Antigravity CLI in a Forkbench terminal. It reads Files with read_file where Forkbench has set up its tools, and with `fb file read` from the shell everywhere else.
- 2Add the document to Files and expose it to the thread: hold Option and drop it on the terminal, which does both and pastes its name.
- 3Ask the agent to read it by name. read_file returns Markdown, one heading per page, sheet or slide, 256 KB at a time, so a long document is paged rather than refused.
- 4Keep the original. get_file still saves the real file to disk when the agent has to work on it with a library.
Straight about the guarantee: Antigravity's PDF handling varies by model and changes between releases; this reflects Google forum reports as of 25 November 2026. Charts and figures in a PDF are not described by the text conversion; Gemini's image reading still sees those.
Frequently asked
Should I still let Gemini read PDFs as images?
For a figure-heavy document, yes, that is what it is good at. For a text document, converting first is cheaper and works the same with every model.
Related: Claude Code says "PDF too large", Giving an agent a document without putting it in the repo