The agent may change both the data and the applications directly in the production instance. It is simpler, because no development instance is needed. But the change affects the users immediately and without verification, and the operator of the instance is responsible for its consequences. The recommended way is described in the guide Agentic development through a development instance. The tokens and the agent rules, which are common to both ways of working, are described in the guide Introducing agentic development.
1. The procedure in brief
- Set the token in the production instance to reading and writing.
- Write into the agent rules what the agent must not do in production and which operations belong outside working hours.
- Back up the database before a larger change.
- Have the agent describe a change before it writes it, and verify it in the portal after the write.
2. Measures that reduce the risk
- A backup before a larger change. Deleting a database control or an edit form deletes its data as well and cannot be undone. Before a larger change, it is therefore advisable to back up the database.
- Writing with the change history. The agent always writes and deletes data with the change history. This belongs in the agent rules.
- The form scripts do not run. A data write through the MCP server does not run the scripts of the edit form – validations, recalculations and notifications do not take place. Data whose saving such logic depends on are written in the edit form (see Integrated MCP server).
- Load and working hours. Changing an application the users are currently working with, and demanding operations, are best done outside working hours. Which operations these are is set by the agent rules.
- Review by the developer. The developer has the agent describe the proposed change before the agent writes it, and verifies it in the portal after the write.
Details
- The agent reads previous versions of scripts, database queries and the code of HTML and JavaScript controls with the “get_model_history” tool. The previous form of edit forms, controls, view pages and permissions it cannot find out through the MCP server.
- A write through the MCP server is not recorded in the change history by default, and the history has to be requested explicitly.
- An edit form with record history logging disabled does not write the history even when writing with the change history. The change history is therefore not switched off.
3. Combining with a development instance
If the production instance also has a development instance in which releases are prepared, the following applies in addition:
- Merging the structure takes over the application model of the development instance as a whole, so it overwrites a change of an application made directly in production. Every such change therefore has to be repeated right away in the development instance – or the development instance is restored from a current backup of production if nothing is in progress in it.
- The comparison of the instances before a release (the chapter Release to the production instance) also shows the changes made directly in production that are missing in the development instance.
- Data written directly in production are not overwritten by a release – the merge keeps the data of the production instance.
This guide belongs to the topic Applications that keep up on the page NET Genium AI.