Assistant inside Oleafly

Your API key, project context, diffs, compile-aware edits.

Assistant inside Oleafly

Oleafly includes an AI assistant that works inside your project rather than in a separate chat window. It differs from pasting LaTeX into a general chatbot in three ways: it runs on your own API key, it can read the project it is editing, and every change it proposes goes through an approval step before touching your files.

Your key, your provider

The assistant makes no model calls through Oleafly’s servers. You supply an API key for one of nine supported hosted providers, or point the app at a local Ollama installation and use a model running on your own hardware. Requests go from your machine to the provider you configured, under that provider’s terms, and you pay the provider directly at their rates. Which model to choose, and how to set up a key or Ollama, is covered in AI setup.

What the assistant can see

When you ask a question or request an edit, the assistant works from a map of your project and reads the files relevant to the request, such as the chapter you are editing, the preamble that defines your macros, or the .bib file behind a citation question. That context is why it can answer “why is Figure 3 floating to the next page” about your actual Figure 3, and why its edits tend to match the notation and commands your document already uses.

Edits you review, not edits that just happen

The assistant never writes into your files directly. It proposes changes as a diff, with removed lines in red and added lines in green, and you accept or reject each one. Before any accepted change is applied, Oleafly records a Git checkpoint, so the state before the edit is always one step away in Git history. Deleting a file is treated separately and always requires your explicit confirmation, whatever else the assistant is doing.

Closing the loop with the compiler

Because the assistant lives next to the build, it can verify its own work instead of guessing. After an edit it can trigger a compile, read the log, and if the change was meant to fix an error, check whether that error is gone. It can also read the text of the compiled PDF, which lets it confirm that a requested change actually shows up in the output. This does not make it infallible; models still produce wrong LaTeX, and you should read what you accept. It does mean broken suggestions tend to get caught and corrected inside the loop rather than discovered by you later.

The day-to-day mechanics live in the docs for chat and inline edit, and A week of writing in Oleafly shows where the assistant fits in a full writing loop.

Back to Human + Model