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
- menu Tools > Show / hide AI Agent chat (Alt+4), or
- the AI button (sparkle icon) in the toolbar, next to the microphone button of VeRa.
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. Below it, as soon as the license key has been read, a line shows the knowledge of
the agent, e.g. Loaded 11 knowledge file(s) - cost about 18000 tokens per request (the size of all knowledge files that
are sent with every request). When some knowledge packs cannot be read (no license, year of the pack
not covered), the line is red and ends with K not loaded (/knowledge); /knowledge shows which files.
Undock and move: the AI Agent window can be undocked and moved like the console – drag its title bar (the state line), double-click it, or use the buttons at the right end of the bar: Undock / dock the window (also double-click on this bar) and Close the window.
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 – tabs Console | AI Agent in the same place at the bottom, like the message window and the AI Agent in the Robot Cell Simulator; 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.
The window – buttons and menus
/knowledge: the knowledge packs of the agent)| No | Element | What it does |
|---|---|---|
| 1 | State line (title bar) | Connection to the model (provider and model), anonymous when the anonymous mode is on, during the work The agent is working... with the progress; after the first request the usage: context in % and the tokens of the chat (colors: green / orange / red, see Usage). Drag the bar to move the window, double-click to undock / dock it. |
| 2 | Undock / Close | Undock / dock the window and Close the window (Alt+4 or the AI button open it again; the chat stays). |
| 3 | New chat | Forgets the conversation and starts a new one. With the option Save the knowledge automatically before a new chat the agent first saves what you taught it (see Teaching the agent), then the new chat starts. |
| 4 | Learn (graduation cap) | Teach the agent: it writes what you taught it in this chat (rules of the cell, procedures, corrections, how to do your tasks) as knowledge files in the folder of your knowledge files and loads them in every new chat. Enabled when the chat has new messages since the last save. |
| 5 | Settings (wrench) | Opens Settings > AI Agent > AI Agent window: connection, API key, model, limits, anonymous mode, knowledge files, automatic saving of the knowledge and the folder of your knowledge files (see Settings). |
| 6 | Chat | Your messages, the answers of the agent with tables and colors, every command with its result. Ctrl + mouse wheel changes the font size. Right click: menu below. |
| 7 | Message field | Your message in plain words. Enter sends, Shift+Enter new line; / shows the chat commands and the
commands of the editor (Commands in the chat). A message written while the agent works waits in a queue. |
| 8 | Send | Sends the message (like Enter). |
| 9 | Stop | Stops the agent after the current command; the chat stays. |
Menu of the chat (right click in the chat) and menu of the message field (right click in the field):
- Copy, Copy Link Location, Select All – the selected text / link of the chat.
- Larger font (Ctrl + wheel), Smaller font – font size of the chat and of the field; it is remembered.
- Copy the whole conversation – the whole chat as text into the clipboard (e.g. for a mail or a ticket).
- Teach the agent - save what it learned as a knowledge file – like the button Learn (gray when nothing new was taught).
- Save the knowledge automatically before a new chat – switches the automatic saving on / off (same option as in the settings).
- Clear (new chat) – like the button New chat.
- Message field: Undo, Redo, Cut, Copy, Paste, Delete, Select All, the font size and Clear (empties the field).
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:
- open, activate, save, close and reload files; list the open documents;
- list the robot projects of the project tree, open a robot project from its configuration file (open_project) and set the active one (set_active_project);
- check the syntax (check_syntax – the agent gets the wrong lines with their messages in the answer, the result window of the editor is closed by itself and does not wait for a click), move the cursor (goto: line, fold, point, tech, UP call), undo / redo (not in KRC programs – they have no undo);
- in KRC / KUKA iiQKA programs list, copy, cut, delete, paste and move whole folds and read and change the parameters of a command (fold) – with the same fold rules as the keyboard, also for edit / replace;
- list and change the parameters of technology commands (tech, see below);
- find and check robot data – robot configuration, program files, point tables and TCP paths of all robot projects (search, robot_data, points, see RobotDataSpy);
- list and start plugins (plugins, run_plugin), e.g. start the Robot Cell Simulator (while the editor restores the session or opens files, status answers busy = true and run_plugin waits until it is ready – answer field waitingFor; until the program has started and the last session is restored – status field startupDone – the editor refuses all other commands except reading ones, ai_chat and answers to a modal dialog with Editor busy: ..., so no plugin or function runs on half loaded robot projects);
- run every menu action (ui_actions, ui_click) and handle dialogs (ui_windows and the other UI commands).
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.
Commands the agent uses
The most important commands of the editor API for the agent (details, parameters and answers: VeRa > Editor API):
| Command | What it gives the agent |
| tech | parameters 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 |
| search | regular expression over the files of the robot projects on the disk; named groups are the values, with their counts per project and file |
| robot_data | data 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 |
| points | point 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_project | opens a robot project from its configuration file ($config.dat, system.va, system.xml, SYSTEM.SYS) like File > Open robot project |
| save_knowledge | saves what you taught the agent as your own knowledge file and adds it to the knowledge of the agent (see Teaching the agent) |
| ai_chat | the AI Agent window itself, for scripts and VeRa (see API); not used inside the chat |
| ui_set scroll | scrolls 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 and .mdk 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.
Knowledge packs of DrAmaT (*.mdk) AI agent knowledge
(since 2026-10-21): the installer delivers the knowledge of DrAmaT only as knowledge packs – signed and
encrypted files that cannot be read or changed outside DReS. A pack is loaded only when the key has
- the license 247 AI agent knowledge and
- the update license of the year of the pack (e.g. Update 2026, feature 207). A pack of a newer release copied into an older installation is therefore not loaded without the update of its year.
The agent does not give out the knowledge of DrAmaT: it does not show it word by word, as a whole, translated or written to a file, and Learn saves only what you taught it in the chat. Ask it what it can do – it answers in its own words. With the provider Claude Code the decrypted instructions are handed over in a temporary file that DReS deletes as soon as Claude Code has started.
A pack that is not loaded is red in the list of the knowledge files of the
settings; its tooltip gives the reason, e.g. License 247 - AI agent knowledge ... not
found or The knowledge pack of 2026 requires the license Update 2026 (feature 207). The summary of the
knowledge in the chat says Not loaded: file (reason). The agent then works without this knowledge.
Help > License info lists all installed packs with their state. Your own
.md files need no license.
Split by topic, common knowledge (since 2026-10-20): the knowledge is divided into
several files, and the folder <installation>\AIAgent\knowledge\common holds the knowledge read by
both agents (the editor and the Robot Cell Simulator):
dres_00_overview.md, vw_10_program_structure.md, vw_20_interlocks.md,
vw_30_optimization_patterns.md, vw_40_good_programs.md, vkrc_commands.md, fanuc_commands.md.
Order of loading:
- the instructions of the agent (
editor_agent_instructions.md, simulator:rcs_agent_instructions.md); - the common files (
knowledge\common\*.md); - the other files of the folder of the agent, alphabetical – numbers in the names set the order
(e.g.
editor_10_commands.md); - your own knowledge files added in the settings (as before) – they have priority for concrete plants and stations.
The agent can also write your own knowledge files itself: what you teach it in the chat is saved with Learn or on your request (see Teaching the agent). It never changes the installed files.
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. The installed packs cannot be edited – write your own .md files
and add them with Add… in the settings (keep them outside the installation, see
below).
Ideas for your own user plugins:
- company checks before the delivery of a robot (e.g. HOME at the start and end of every Folge, no point with tool 0, all used tools and bases defined, versions of the user files);
- naming rules of programs, points and comments;
- standard parameters of technology commands (e.g. the allowed FahrzeugTyp and Offset of the spot welds, glue parameters) – the agent lists the differences and offers the change;
- reports in a fixed form (table per robot, CSV for Excel) for the commissioning or the customer.
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. /knowledge in the chat lists the knowledge files that the agent uses, with
version, title and the first sentence of each file, and the files that are not loaded.
| Built-in knowledge files (editor) | Content |
editor_agent_instructions.mdk | rules 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 (version 2.0) |
editor_10_commands.mdk | the commands of the editor API for the agent and how to use them |
common\*.mdk | common knowledge of both agents: DReS overview, VW program structure, interlocks, optimisation patterns, good programs, VKRC and Fanuc commands |
robot_data_spy_agent.mdk | RobotDataSpy – finding and checking robot data without XML patterns or JavaScript rules; independent of the plugin Robot Data Spy |
.md
files. When a .md file and a pack have the same name, DReS reads the newer one. Give your own files names of
their own (e.g. company_checks.md); best keep them in a folder outside the installation and add them with
Add… in the settings.Teaching the agent – own knowledge files
The agent learns from you. Connect your own AI provider (an OpenAI-compatible service such as Azure OpenAI or the LLM service of your company, the Anthropic API or Claude Code – see Connection), explain in the chat how things are done in your plant, correct the agent when it is wrong – and let it save this as a knowledge file. The file is added to the knowledge files and loaded automatically in every new chat, so you do not have to explain the same again.
What the agent saves: lasting knowledge only – rules of the cell or plant, procedures, how to do your tasks in
the editor, code patterns, checks of programs, meanings of signals and names. Short and precise, in Markdown with headings,
one file per topic with a short English name (e.g. cell_rules.md); an existing file of the same topic gets a
new section. Passwords, keys, personal data and one-time results are not saved. At the end the agent tells you in one
or two sentences what it saved and where.
Ways to save:
- button Learn (graduation cap with an AI spark) in the button column at the right of the chat, under New chat: the agent looks at this chat and saves what you taught it or corrected; when nothing new was taught, the chat says so and nothing is saved;
- context menu of the chat (right click): Teach the agent - save what it learned as a knowledge file – the same as the button;
- automatically: the checkable entry Save the knowledge automatically before a new chat in the same context menu, or the check box Save what the agent learned automatically before each new chat in the settings. Before New chat (also Clear (new chat) in the context menu) the agent first saves the knowledge of this chat, then the new chat starts. This costs one request to the model; Stop during the saving keeps the conversation;
- in your own words, e.g. "Remember this rule" or "Save this knowledge to a new knowledge file".
Folder: the field Your knowledge files: in the settings; empty = the folder
knowledge in the folder of the agent files (Settings > AI Agent > Command API, default
Documents\DReS AI\knowledge). Files that you keep elsewhere: add them with Add… in the list of the
knowledge files. The agent never writes into the installation.
The files are yours: plain Markdown (.md, UTF-8), no license needed – open them in any text
editor, correct or shorten them, delete what is wrong. A new file gets a version line, e.g.
Version: 1.0 (2026-10-24); an added section starts with ## Added 2026-10-24. After you changed a
file, /reload in the chat loads the knowledge again; /knowledge lists the files that the agent uses.
When the agent saves a file while it works, the file is loaded in the next chat or after /reload; when it is idle
(e.g. the command from a script), at once.
API: the editor command save_knowledge writes such a file; ai_chat
learn, autoLearn and learnDir do what the button and the settings do (see
API).
Commands in the chat
They work locally – no request to the model, no tokens:
/help– what the agent does, examples, the commands, the current connection and the path of the log of the agent;/reload– loads the knowledge files again (the conversation stays);/knowledge(also/wiedza,/wissen) – lists the knowledge of the agent: the header Knowledge of the agent: N loaded, K not loaded, then one entry per file – [pack] (knowledge pack.mdk) or [file] (.md), name, version, title and the first sentence of the file; a pack that cannot be read is shown as [locked] file - reason (licenses: Help > License info);/anonymous on|off(short:/anon on|off) – switches the anonymous mode on or off (a new chat starts);/mode– shows the mode and, when it is on, the key R1 = 0001R01, ….
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}. Suggestions: after
/ a list of the commands opens (also /help, /reload, /knowledge, /mode,
/anonymous on | off) and gets shorter while you type; Enter or Tab takes the selected command, Esc closes the
list. Examples:
/status– state of the editor;/documents– open documents (file, modified, active);/projects– robot projects of the project tree;/set_active_project name=R03– sets the active robot project;/open {"file":"D:/x/KRC/R03/Program/folge81.src","line":40}– opens a file at a line.
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:
- Show all SERVOZANGE commands of the open programs
- Set FahrzeugTyp to 2 in all spot welds of the open programs – first show me what would change
- Find all SERVOZANGE commands in all projects and export their parameters to CSV
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.
- The parameter names are the names of the dialog of the command (from the VW user definitions, e.g. Fzg-Typ, Techaufruf); SERVOZANGE: Programmnummer, Punktnummer, FahrzeugTyp, Offset, TeachIn, Ausgleich, Kraft, Blechdicke, …, Bedingung. Strom, Doppelhub and Messen can be changed only in the dialog of the fold. Values of a list may be given as the number or as the text.
- VW user: the VKRC TECH definitions come from the VW user selected in the toolbar (Select vw user), set automatically when a robot project is activated. Files of the active project are changed. A file of another project: changed only when its VW user (read from KRC\R1\VW_User\vw_usr_s.src) is the same as in the toolbar, otherwise the agent first activates that project (set_active_project). A file outside all projects only with useSelectedVwUser. Fanuc: only files of the active project. SERVOZANGE folds need no VW user.
- The change stays in the editor – the documents are modified, not saved; the agent saves them only on your request. Undo does not work for these changes. On saving the KRL code is generated again (e.g. VW_SGB_SPOT_ADV/MAIN(...,FahrzeugTyp,...)); saving a VKRC program normalizes its format.
- Requires the license API / CLI.
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:
- robot configuration – what the tabs Robot info, Profinet and CTB data show: name, model, serial number, software, VW user, IP address, tools, bases, loads, Profinet devices, EtherCAT modules (KUKA), calibration (mastering), axis limits – for all robot projects of the project tree, also the inactive ones (VKRC, KRC, Fanuc, ABB, Yaskawa);
- program files on the disk – search with a regular expression over the files of the robot projects (Folge, UP, Makro, $config.dat, $machine.dat …), the found values with their counts;
- point tables – X, Y, Z, A, B, C, S, T, tool and base of every point (as the export of the point table), the length of the TCP path, the motion time and the process length (e.g. glue) between the lines that switch the process on and off.
Further examples of messages:
- Show the coordinates of the points of UP42 of 0001R05 in a table and the length of the TCP path
- How long is the glue path in UP12? (the agent first finds the lines that switch the glue on and off and tells you which lines it used)
- Which robots request the collision areas A81 to A96 and where?
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.
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 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).
| Data | What 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.
| Way | How it works |
| A. Anthropic API – API key | DReS talks with the model directly (console.anthropic.com, you pay for the tokens); the fastest way |
| B. Claude Code – your claude.ai account | no 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 API | VW 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.
| Field | Meaning |
| Provider | Anthropic 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, Python | only for Claude Code: claude.exe (found automatically in PATH) and the
Python 3 that runs the MCP server AIAgent\vera_mcp.py |
| Address | address of the API, filled with the default of the provider; VW LLMaaS: the address from the LLMaaS portal (…/chat/completions) |
| API key / token | the key of the provider; stored in the settings of this Windows user (obfuscated) |
| Key header | only for the OpenAI-compatible API: Authorization (Bearer token, default) or e.g. api-key (Azure OpenAI) |
| Model | name of the model, e.g. claude-sonnet-5-5; empty = default of the provider |
| Steps per message | most 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 chat | limit of one chat (in + out) for the colored percentage; no limit possible |
| Anonymous mode | see 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 files | the 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; a knowledge pack that cannot be loaded is red, the reason is in its tooltip |
| Save what the agent learned automatically before each new chat | before New chat / Clear the agent first saves what you taught it in this chat as knowledge files (one request to the model), then the new chat starts; default off; see Teaching the agent |
| Load the AI knowledge on startup (warm-up in the background) | about 8 seconds after the start the program
reads the knowledge files and starts Claude Code (claude --version) and Python once in a background thread,
so that the first message of the chat is answered faster; no request to the model, no network traffic, no tokens;
does nothing when no connection to the model is set (Claude Code not found, no API key, no OpenAI key and address);
default off; separate for the editor and the simulator |
| Your knowledge files: | folder of the knowledge files written by the agent (Learn,
save_knowledge); empty = <folder of the agent files>\knowledge, default
Documents\DReS AI\knowledge; only in the editor |
| Separate per program | Editor | Robot Cell Simulator |
Knowledge folder (all .md / .mdk files loaded) | <installation>\AIAgent\knowledge |
<installation>\template\RCS\AIAgent\knowledge |
| Common knowledge (read by both, after the instructions of the agent) | <installation>\AIAgent\knowledge\common | |
| Check box Ask before the first sending of real data (YES / ANON / NO) | default off | default 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:
| Parameter | Meaning |
| show | true shows the window, false hides it |
| message | sends a message to the agent (also shows the window); answer to the question:
"yes" | "anon" | "no" |
| stop | true stops the agent |
| newChat | true starts a new chat like the button New chat (with autoLearn the agent
first saves the knowledge of this chat) |
| learn | true – like the button Learn: the agent saves what it was taught in this chat
as knowledge files (Teaching the agent) |
| autoLearn | true | false – the setting Save what the agent learned
automatically before each new chat |
| learnDir | folder of your knowledge files (the setting Your knowledge files:); "" = default
folder |
| anonymous | true | false – anonymous mode |
| warmUp | true | false – the setting Load the AI knowledge on startup
(warm-up in the background) |
| last | number of the last entries of the conversation in transcript (default 20) |
Answer: visible, busy, anonymous, autoLearn, learnDir (the folder in use),
warmUp (the setting), connectionConfigured (true when a connection to the model is set: Claude Code
found / API key / OpenAI key and address), 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
| Symptom | What 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 line | the license API / CLI or the API key is missing |
| context NN % red | start a New chat |
| a changed knowledge file has no effect | Refresh knowledge or /reload; check the version in
the list of the knowledge files |
a knowledge file *.mdk is red, Not loaded: … in the chat | the license 247 AI agent knowledge or the update license of the year of the pack is missing (tooltip of the file, Help > License info) – buy or renew the license at dramat.eu |
| login of Claude Code, Python, HTTP errors | see Problems of the AI Agent window of the simulator – the causes are the same |


