Editor – AI Agent window
« VeRa - AI agent and voice control | Contents | AI Agent window of the Robot Cell Simulator »
AI Agent window | Opening | Examples | What the agent does | Commands of the agent | Knowledge files = user plugins | Chat commands and colors | Direct commands | Technology parameters | RobotDataSpy | Usage | Console as a tab | Anonymous mode | Connection | Settings | API | Problems

AI Agent window API / CLI

The editor has its own chat with an AI agent. You write in plain words what the agent should do – e.g. "Check the first and last points of all Folgen" or "Show me all spot welds with Offset 0" – and a language model plans the steps and uses the commands of the editor like the menus, buttons and dialogs. It reads the programs, the point tables and the robot data of all robot projects of the project tree, compares them and answers with tables and conclusions. You do not have to know the commands: the agent proposes the next steps itself.

The chat shows your messages, the answers of the agent and every command with its result. The window is the same as the AI Agent window of the Robot Cell Simulator (state line, New chat, settings button, Send, Stop, font size, live answer, tables, queue of messages) – only the commands are those of the editor. The agent answers in the language of your message.

Opening

The window is docked at the bottom of the main window. It can be closed and opened again; the conversation stays until New chat. Every time the window is opened and after New chat the chat shows a short welcome line with a link to this page and the hint type /help.

Console next to the chat: in the context menu of the console (right click) Dock next to the AI Agent window puts the console as a tab next to the AI Agent window – by default the two share the width half / half, the tabs are at the top (see Console as a tab). Font size: Larger font (Ctrl + wheel) / Smaller font in the context menu, or Ctrl + mouse wheel – in the console and in the chat; the size is remembered.

By voice: a spoken command that VeRa does not know ("Vera, how many robot projects are open?") is sent as a message to this window – the window opens, VeRa says "I passed it to the AI agent" and the agent answers in the chat. Setting: Settings > Configure > AI Agent > VeRa voice control, on by default; it needs the license API / CLI like the window itself.

Examples: one prompt – a complete check

The two examples below were made on an anonymized example station with five robot projects (0001R01 to 0001R05). Each shows the prompt as it was typed, the editor with the answer and the full text of the answer. The answer text contains the markers {red}…{/red} and {green}…{/green}: the chat shows these parts in color (see Colors); in the text below they are left as they are.

Example 1 – points of the Folgen and of the UP calls

Prompt:
Check whether points 1, 2 and the last one in every Folge have the same coordinates, and whether the first point of every UP has the same coordinates as the point where the UP is called. The difference may be max. 2 mm. Show me the programs where this condition is not met.

The agent says that this takes a moment and runs one points call over the Folgen of all robot projects (fileMask ["folge*"]) with the checks samePoints ([["1","2"],["1","last"]]) and callStart, tolerance 2 mm. DReS computes the distances itself; points with different bases and the same tool are compared in world coordinates (bases from $config.dat), points with different tools are reported as not comparable. It takes about 1.5 minutes (about 2 s per program).

Result: 38 Folgen of 5 robots – 76 point checks, 0 failed; 118 UP calls, 2 failed: in 0001R05 FOLGE81 and Folge83 call UP42 at P2, and the first point of UP42 differs by 5.0 mm (compared in world coordinates, Base 0 against Base 1). Because both Folgen show the same difference, the agent concludes that UP42 itself (its P1 or the definition of Base 1) is the likely cause. Nothing was changed. (In this example station one point was moved by 5 mm on purpose to show how a difference is found.)

The editor with the AI Agent window: result of example 1 – 5.0 mm in red, 0 failed point checks in green

Full answer (as in the chat):

Example 2 – spot welds (SERVOZANGE)

Prompt:
Find the SERVOZANGE commands and show me all used Programmnummer, Punktnummer and FahrzeugTyp. Check if Offset is greater than 0, only in UP programs. Mark the values 0 in red.

The agent runs tech list with scope projects, fields (Programmnummer, Punktnummer, FahrzeugTyp, Offset) and fileMask ["up*"]. It reads the files from the disk – nothing is opened, nothing is changed – and gets a summary of the used values with their counts, so even hundreds of spot welds fit into a short answer.

Result: 143 SERVOZANGE commands in the UP programs of 0001R01, 0001R04 and 0001R05, of them 98 Schweissen: Programmnummer 99 everywhere, FahrzeugTyp 6 or 7; Offset 30 only in 0001R01 (48 welds), Offset 0 (red) in 0001R04 and 0001R05 (50 welds). The service commands Setzhub, Fraesen and Service have FahrzeugTyp 0. The agent also noticed by itself that some Punktnummer are used in two robots and asks to check them. At the end it offers a CSV export or a change of the Offset values (with a preview first).

Result of example 2: the table of the spot welds – Offset 0 in red, yes green / no red

Full answer (as in the chat):

Further examples of messages:

What the agent does

The agent works in the editor with the editor command API (tool editor_command), run inside the program – no pipe, no windows. It can:

With the tool read_doc the agent reads pages of this documentation (editor_ai_agent, vera – the editor API, vera_menu_reference – every menu action, rcs_api – the UI commands) before it uses a command it does not know.

The agent never saves or changes robot programs unless you ask for it. Before a change it shows what would change (dryRun); modified files are saved only on your request.

Commands the agent uses

The most important commands of the editor API for the agent (details, parameters and answers: VeRa > Editor API):

CommandWhat it gives the agent
techparameters of the technology commands: VKRC TECH folds, SERVOZANGE folds, Fanuc CALL VW_USER(...) – list from the disk over all robot projects (with a summary of the values and conditions like Offset > 0), change with dryRun first, export to CSV
searchregular expression over the files of the robot projects on the disk; named groups are the values, with their counts per project and file
robot_datadata of the robots from their configuration – what the tabs Robot info, Profinet and CTB data show (tools, bases, loads, IP, VW user, calibration …), also for inactive projects
pointspoint table of a program, length of the TCP path, motion time, process (e.g. glue) length; for many programs the checks samePoints and callStart, compared in world coordinates
open_projectopens a robot project from its configuration file ($config.dat, system.va, system.xml, SYSTEM.SYS) like File > Open robot project
ai_chatthe AI Agent window itself, for scripts and VeRa (see API); not used inside the chat
ui_set scrollscrolls a text field or a list: "top", "bottom", 0..1 or "find:text" – e.g. the conversation of this window for a screenshot

Knowledge files – your own user plugins

What the agent knows and how it works is written in knowledge files: Markdown files (.md) in plain English. All .md files of the folder <installation>\AIAgent\knowledge are loaded automatically when the AI Agent window starts (Robot Cell Simulator: <installation>\template\RCS\AIAgent\knowledge). They are sent to the model as its instructions.

A knowledge file works like a user plugin for the editor – an AI agent written in words, not in code. It describes what to check, which commands of the editor to use and how to answer; the agent then uses the functions of the editor (the API commands above): it reads and checks the programs of all robot projects, changes them (always with a dryRun first) and saves them on request. You can edit the installed files or add your own .md files to the folder (or with Add… in the settings from any other folder).

Ideas for your own user plugins:

Version: each knowledge file has a version line at the top, e.g. Version: 1.6 (2026-10-18), and a version history at the end. The version is shown in the list of the knowledge files in the settings, e.g. editor_agent_instructions.md (version 1.6) [knowledge folder], and in the chat when the knowledge is loaded. Give your own files a version line too – then you can see at once which state an installation uses.

After a change of a file: Refresh knowledge in the settings or /reload in the chat loads the files again; the conversation stays.

Built-in knowledge files (editor)Content
editor_agent_instructions.mdrules of the editor agent: how to use the commands, never save without a request, dryRun before a change, tables and colors in the answers, real project names
robot_data_spy_agent.mdRobotDataSpy – finding and checking robot data without XML patterns or JavaScript rules; independent of the plugin Robot Data Spy
The installer overwrites the built-in files with a new version. Give your own files their own names (e.g. company_checks.md) so that an update does not replace them.

Commands in the chat

They work locally – no request to the model, no tokens:

Names in the answers: the agent writes the real, full names of the robot projects (e.g. 0001R05, not R05); they are shortened to R1, R2 … only in the anonymous mode.

Colors in the answers: the agent marks important values with {red}…{/red}, {green}…{/green} and {orange}…{/orange}; the chat shows them in red, green and orange (also in tables). You can ask for it in the prompt, e.g. "Mark the values 0 in red".

Direct commands of the editor (without the model)

Every other message that starts with / and a letter is a command of the editor API, run at once in the program: without the model and without tokens, also while the agent works. Syntax: /name key=value … or /name {json}. Examples:

The JSON answer appears in the conversation (an error in red). Commands that change something need the license API / CLI, like in the command API. /ai_chat is not available in the chat.

Changing parameters of technology commands

The agent reads and changes the parameters of technology commands with the API command tech: VKRC TECH folds (%VUSER) and SERVOZANGE folds (%VSERVOGUN) of Folge, UP and Makro programs and Fanuc CALL VW_USER(...) – in the open programs or in all programs of the robot projects (scope projects). A complete analysis: Example 2. Further messages:

All robot projects: the agent searches the Folge, UP and Makro files of the VKRC and Fanuc projects of the project tree on the disk (optionally only some projects, e.g. R04 and R05, or only some programs, e.g. only UP programs; at most 300 files by default). Reading does not open anything – the files are read from the disk, nothing is changed. Only for a change the files with matching commands are opened in the editor – they stay open, so you can check and save them. Conditions like Offset > 0 or FahrzeugTyp != 6 select the commands. CSV: the list of the commands can be written to a CSV file (one row per command, columns Project;File;Line;Command, one column per parameter and Text; separator ;, UTF-8 with BOM – opens in Excel).

First a dry run: before a change the agent runs tech with dryRun and shows you the list of the changes (line, old and new text, errors). Only after your confirmation it changes the programs.

RobotDataSpy – find and check robot data

The editor AI agent includes the knowledge RobotDataSpy (file AIAgent\knowledge\robot_data_spy_agent.md, always loaded when the AI Agent window starts). It is independent from the plugin Robot Data Spy: no XML patterns and no JavaScript are needed. You say in plain words what to find – which values, which errors, which robots – and the agent builds the search itself with the editor commands search, robot_data, points and tech. It answers with a compact table and the conclusions and says in one line how it searched (e.g. searched up*.src of 5 robots, 21 files). It only reads – nothing is opened, nothing is changed. A complete check: Example 1.

Data sources:

Further examples of messages:

A large result is summarized; the agent offers a CSV export (opens in Excel). If the agent cannot do something with its knowledge, it says so – new functions are added on request of the customers, and you can add your own knowledge files.

Usage in the state line

After the first answer the state line (title bar of the window) shows context NN % – the input tokens of the last request divided by the setting Context window [tokens] – and the tokens in this chat (the sum of all requests, in and out), optionally with (NN % of the limit) of the setting Token limit per chat. Colors: green below 60 %, orange below 85 %, red from 85 % – then start a New chat.

Claude Code (claude.ai account): there is no API billing – the numbers are reported by Claude Code and count toward the usage limits of your claude.ai plan. Claude Code adds its own system prompt and tool definitions, so even a short question has many input tokens (most of them cached).

Console as a tab

Tools > Show / hide console (Alt+3) and Tools > Show / hide AI Agent chat (Alt+4) switch the windows on and off – like the file tree. In the context menu of the console (right click) Dock next to the AI Agent window puts the console as a tab next to the AI Agent window at the bottom of the main window – like the Message Window and the AI Agent in the Robot Cell Simulator. By default the console and the chat share the width half / half. So the messages of the editor (e.g. the result of check_syntax) and the chat are in one place.

The docked console has its tabs at the top and no Tools bar and no Clear button: Save, Print, Print to pdf, Export, Show debug output, Larger font (Ctrl + wheel), Smaller font and Dock next to the AI Agent window are in the context menu of the console.

Anonymous mode

In the anonymous mode the model does not see the names of the plant: DReS replaces them by identifiers before a text goes to the model and puts the real names back in what comes from the model (both ways).

DataWhat the model sees
names of the robot projects (e.g. 0001R01)R1, R2 …
file paths<file N>
identifiers of the plant<name>

Switch: /anonymous on | off (or /anon on | off) in the chat, the check box Anonymous mode in the settings or ai_chat anonymous in the API. A change starts a new chat. With Claude Code the agent may not read files in this mode (the files contain the real names).

Question before the first real data: when the check box Ask before the first sending of real data (YES / ANON / NO) is on (in the editor default off, in the simulator default on) and the anonymous mode is off, the first message that would go to the model is held and the chat asks: YES – send the real data, ANON – switch on the anonymous mode, NO – nothing is sent. Details: AI Agent window of the simulator.

Connection to the model

All ways need the additional license API / CLI.

Your own access to the AI model: the agent uses your account or API key (Anthropic, an OpenAI-compatible service such as VW LLMaaS / Azure OpenAI, your own claude.ai account) or a local model (e.g. Ollama). The usage of the model is paid directly to your AI provider under your own contract – DReS adds no AI fees and no usage limits of its own; the DReS license covers only the program.

WayHow it works
A. Anthropic API – API keyDReS talks with the model directly (console.anthropic.com, you pay for the tokens); the fastest way
B. Claude Code – your claude.ai accountno API key; DReS starts Claude Code with the MCP server VeRa (AIAgent\vera_mcp.py, Python 3); Claude Code controls the editor through the command API. Requires the command API to be switched on: Settings > Configure > AI Agent > Command API. Only for your own use
C. OpenAI-compatible APIVW LLMaaS, Azure OpenAI, OpenAI, a local Ollama or another provider: address, token and model

The steps (account, key, login of Claude Code, Python) are the same as for the simulator: Configuration step by step.

Settings

Settings > Configure > AI Agent, tab AI Agent window (the page has four tabs; the others are described in VeRa). The settings button in the chat opens this tab directly.

Settings > Configure > AI Agent, tab AI Agent window (local paths hidden)
FieldMeaning
ProviderAnthropic API (Claude) – with an API key; OpenAI-compatible API (VW LLMaaS, Azure OpenAI, OpenAI, local Ollama); Claude Code - your claude.ai account (own use only) (see Connection)
Claude Code program, Pythononly for Claude Code: claude.exe (found automatically in PATH) and the Python 3 that runs the MCP server AIAgent\vera_mcp.py
Addressaddress of the API, filled with the default of the provider; VW LLMaaS: the address from the LLMaaS portal (…/chat/completions)
API key / tokenthe key of the provider; stored in the settings of this Windows user (obfuscated)
Key headeronly for the OpenAI-compatible API: Authorization (Bearer token, default) or e.g. api-key (Azure OpenAI)
Modelname of the model, e.g. claude-sonnet-5-5; empty = default of the provider
Steps per messagemost commands of the agent for one message – protects against loops and costs
Context window [tokens]size of the context of the model, for the percentage in the state line
Token limit per chatlimit of one chat (in + out) for the colored percentage; no limit possible
Anonymous modesee Anonymous mode
Ask before the first sending of real data (YES / ANON / NO)see Question before the first real data; editor default off, simulator default on
Knowledge filesthe list of the knowledge files with their versions; the files of the knowledge folder are marked [knowledge folder] and always loaded; Add… / Remove for further files, Default – only the installed files, Refresh knowledge – save the list and load the files again
One connection for the editor and the simulator: provider, address, API key, model, steps per message, context window, token limit and the anonymous mode are common for the editor and the Robot Cell Simulator – enter the key once and both windows use it.
Separate per programEditorRobot Cell Simulator
Knowledge folder (all .md files loaded)<installation>\AIAgent\knowledge <installation>\template\RCS\AIAgent\knowledge
Check box Ask before the first sending of real data (YES / ANON / NO)default offdefault on

License: the window needs the additional license API / CLI. Without it only the reading direct commands work (and /help, /reload).

Log of the agent: %TEMP%\dres_rcs_agent\ai_agent_YYYYMMDD.log (one file per day, common with the simulator); /help shows the path.

API

Editor command ai_chat (pipe DReS_API, see Editor API); needs the license API / CLI:

ParameterMeaning
showtrue shows the window, false hides it
messagesends a message to the agent (also shows the window); answer to the question: "yes" | "anon" | "no"
stoptrue stops the agent
newChattrue starts a new chat
anonymoustrue | false – anonymous mode
lastnumber of the last entries of the conversation in transcript (default 20)

Answer: visible, busy, anonymous, consentPending (the question YES / ANON / NO waits), transcript. Example: {"cmd":"ai_chat","message":"Show the robot projects","last":5}. The conversation can be scrolled with ui_set scroll ("top", "bottom", 0..1, "find:text").

Problems

SymptomWhat to do
Claude Code reaches the editor through its command API - switch it on…Settings > Configure > AI Agent > Command API: switch on the command API of the editor
messages are rejected, red text in the state linethe license API / CLI or the API key is missing
context NN % redstart a New chat
a changed knowledge file has no effectRefresh knowledge or /reload; check the version in the list of the knowledge files
login of Claude Code, Python, HTTP errorssee Problems of the AI Agent window of the simulator – the causes are the same
Data protection: the agent sends your messages, the answers of the editor commands (file names, program lines, robot projects) and its instructions to the model of the provider. Check that this is allowed for your data; use the anonymous mode or a model in the company network.


« VeRa - AI agent and voice control | Contents | AI Agent window of the Robot Cell Simulator »