LatexDo Research

Grounded AI

AI

How LatexDo connects AI assistance to project files, compilation, checks, citations, and local or cloud model providers.

Grounded AI

An assistant wired into the same project tools.

The AI assistant is not a detached chatbot. The renderer runs an agent loop that can call LatexDo tools for files, the active editor, compilation, checks, citation lookup, and graph-backed recommendations.

Tool Layer

  • list_files, read_file, and get_active_document inspect project context.
  • edit_selection, insert_at_cursor, and write_file make controlled editor changes.
  • compile verifies edits and returns compiler diagnostics plus the log tail.
  • run_checks, insert_citation, and recommend_citations connect AI to checkers and the citation graph.

Models

  • Cloud mode supports Anthropic Messages and OpenAI-compatible chat completions with native tool calls.
  • Ollama runs through Electron main-process IPC and uses Ollama's native tool-calling endpoint.
  • Local GGUF models run through node-llama-cpp with a JSON fallback tool protocol.
  • The setup catalog includes Qwen2.5 Coder, Qwen3, Llama, Phi, SmolLM, and an inline-completion tier.

Guardrails

AI access is controlled by settings for chat history, current editor, project files, bibliography, and researcher profile. Mutating actions can require approval, the agent has a max-step budget, requests can be aborted, and the prompt tells the model to inspect files before editing and compile after risky changes.