Skip to content

Write a script with the agent

The agent turns a description into a working input. It does not guess from memory: it looks up each command in an index of the engine’s manual, tutorials and example inputs, writes a script, and checks it with your executable. If the check fails, it reads the error, looks up what it got wrong and tries again, up to ten times.

Open Settings → Agent model and enter:

  • Base URL of any OpenAI-compatible API. The default is OpenRouter; a local server such as Ollama or LM Studio works too.
  • Model, as that API names it.
  • API key, if needed. It is stored by verlet-agent on your computer and never shown again.

Test checks the model answers.

  1. On Simulations, press New simulation.

  2. Describe what you want. Say what matters: units, system, size, ensemble, temperature, length, output. For example:

    SPC/E water box, 500 molecules, 300 K and 1 atm, NPT with a Nosé–Hoover thermostat and barostat, 1 fs timestep, PPPM electrostatics, 50 ps, thermo every 100 steps.

  3. Press Draft with the agent.

The agent's activity while it drafts a scriptThe agent's activity while it drafts a script
In the feedWhat it is
ThinkingThe model’s reasoning, when the model shares it.
Tool callsLookups in the documentation index and the tools below.
ScriptEach draft, as it is written.
CheckThe result of running the draft: passed, or the error and its line.

The draft moves through retrieving → drafting → checking → repairing and ends done, failed or cancelled. You can cancel at any time.

ToolWhat it does
search_documentationSearches the manual, tutorials and examples.
read_documentation, read_sectionReads a command’s page, or one section of it.
read_exampleReads a complete example input.
list_potential_filesLists the potential files the engine ships.
write_companion_file, list_companion_filesWrites a small file the script needs, such as a molecule template.
web_search, fetch_pageLooks outside the manual when the index has nothing.

All attempts are written as version 1, in place, so a failed attempt never becomes a version of its own. When one passes, the simulation is ready to run. If none passes in ten attempts, the last draft is saved with its problems marked, for you to finish in the editor.

  • Name the packages your executable has if the system needs special styles.
  • Data files and potentials are not invented. If the system needs a data file, say where it is.
  • Edit the result like any other script: saving checks it and makes version 2.