The Agent

Codevre's AI coding agent can read and edit your project, run commands in Nodepod, and check the live preview. It can also act as a plain chat.

Last updated 5 min read
On this page

Open the Agent from View ▸ Agent, the Tools sidebar, or the Start with AI box on the Welcome page. The Agent layout (?layout=agent) puts it next to the Browser.

  1. Sign in. Your keys and Agent settings are saved to your Codevre account.
  2. Add an API key for a provider. OpenRouter has free models. See Providers and API keys.
  3. Pick a model. OpenRouter's Default (openrouter/free) routes each request to a free model that supports what the request needs, such as tool calling.

If something is missing when you send, the Agent shows a card to fix it. Your draft and attachments stay where they are.

ModeWhat it can do
Agent (default)Reads and edits files, runs commands in the terminal, starts and inspects the preview, takes screenshots, changes settings
ChatAnswers only. It can't see or touch your project, so it gives you code to apply yourself

Switch with the control in the composer. When you switch mid-conversation, the Agent is told; after moving from Chat to Agent, it checks the files before assuming that code it only described was applied.

Agent mode needs a model that supports tool calling. Models that don't are tagged no tools in the model menu.

  1. You send a message. You can attach up to 5 images or text files, paste large text, or select code in the editor first; the selection is included.
  2. The Agent works in steps. Each step shows as a card (Read, Edit, Run, Inspect preview…), collapsed into a summary like "Read 2 files, edited 3 files and ran a command".
  3. For bigger tasks it keeps a short plan with checkboxes.
  4. When it builds or fixes something, it checks the result: it reruns the preview, reads the console and network errors, or takes a screenshot.
  5. It finishes with a short summary of what changed and anything you need to do.

Press Stop (or Esc) to end a run. Stop doesn't end servers the Agent already started; stop those from the terminal or the status bar.

Agent settings ▸ Ask before controls what needs your OK:

OptionAsks before
Commands and deletes (default)Running terminal commands and deleting files
Any changeAlso writing, editing, moving files, saving screenshots and changing settings
Nothing (auto-approve)Nothing

An approval bar appears on the step: Allow or Decline. Declining tells the Agent you said no. Pressing Stop while it waits counts as declining.

Stopping a process, closing terminals or browser tabs, opening files and running the preview never ask.

The Agent is told how Codevre works, so it builds projects that run here:

  • Static sites go in localhost:codevre (VRE). It doesn't start live-server or http-server; it calls run_preview.
  • Node servers run in the terminal (Nodepod) and open as localhost:PORT tabs.
  • New projects start from Codevre's starters: plain HTML/CSS/JS, esbuild, Node, or React via esm.sh.
  • It avoids packages that need native binaries (sharp, sqlite3, bcrypt, puppeteer…) and uses pure-JS alternatives.
  • Project-specific settings go in .codevre/settings.json, never in your User settings.
  • For UI work it can follow Codevre's built-in design guide (toggle Use design guide in Agent settings).

Can:

  • read, write, edit, move and delete files inside the project
  • search the project and check JS syntax
  • run commands in Nodepod (npm install, builds, node, git)
  • start, stop and read terminals; wait for servers
  • run, reload and inspect both previews: DOM, console, network and errors
  • take screenshots of the preview, for itself or to show you
  • read the same Problems you see in the status bar
  • read and change settings, and run command-palette commands
  • offer files for download (up to 8 MB)

Can't:

  • reach anything outside the project's runtime: your computer's files, other tabs, your Codevre account, or your saved keys
  • use your GitHub token. Git commands it runs are never authenticated. Push yourself from Source Control.
  • browse the web, except through commands that run in Nodepod
  • delete the project root
  • run more than 5 terminals, a duplicate dev server, or a static file server VRE could replace

To keep runs focused and costs predictable, each message has a budget. There are about 24 model calls and 18 tool calls; each successful write adds 4 more, up to 40. Bug-fix requests get a smaller budget. If the Agent explores without making changes, it's nudged and then paused.

When a run reaches a limit, it pauses at a checkpoint with a Done / Found / Next summary. Click Continue, or type "continue", to carry on.

  • Each project can have many chats. Click the chat title to see history, search, start a New chat, or delete one.
  • Edit a message (pencil, or ↑ in an empty composer) or Retry a reply to create a new version. Use ‹ › to switch between versions.
  • Chats are saved with the project when you save it (latest 20). Images, attachment contents, reasoning text and downloads aren't saved, and long tool output is trimmed.
  • Saved chats follow the project's visibility. If the project is public, so are its chats. See Privacy.

Retry and Edit don't undo file changes from the earlier reply. Use the editor's Undo, or Git, to roll back.

Open them with the adjustments button in the Agent:

SettingWhere it's storedDefault
Provider and modelYour account (User settings)OpenRouter, openrouter/free
Chat / Agent modeThis browserAgent
Ask beforeThis browserCommands and deletes
Reasoning effort (Lowest, Low, Medium, High)This browserLowest
Use design guideThis browserOn
Recent modelsThis browser

Higher reasoning effort is slower and costs more. Lowest is fastest and cheapest.

The composer shows tokens used this session, how much was cached, and the cost when the provider reports it (OpenRouter does). Long system prompts are cached where the provider supports it, which lowers cost on later steps.

  • Provider errors (rate limits, timeouts, overloaded models) are retried automatically 3 times. Free models fail more often; if they keep failing, pick another model.
  • "Model not found or unavailable": choose another model.
  • Quota or credit errors: add credit with your provider.
  • "This model can't use tools": switch to Chat, or pick a model that supports tools.
  • "The reply hit the model's output limit": ask it to continue, or to write large files in parts.

See also: Agent tools reference · Providers and API keys

Docs