The recommended way of agentic development in a full installation of NET Genium: the agent changes applications in a development instance, and only verified changes reach production. An agent error thus stays where it harms nobody. 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 up the development instance as a copy of the production one.
- Set the tokens: reading and writing in the development instance, reading only in the production one.
- Develop with the agent in the development instance and keep a list of changes.
- Compare the two instances before the release.
- Transfer the application structure to production with a release.
- Restore the development instance from the current state of production.
2. Setting up the development instance
- The development instance is a separate installation of NET Genium with a copy of the database of the production instance, used exclusively for testing changes. Installing it and transferring the database, the external functions, the print templates and the file attachments is described in the Development environment guide.
- The development instance needs its own license key with agentic development enabled. NetGenium provides it for one development instance of the production instance at no additional fee.
- Both instances are kept on the same version of NET Genium – the structure cannot be merged between different versions.
- The development instance carries production data, personal data included, and the agent sends them from it to the AI provider just as it does from the production instance. Securing the development instance and anonymizing the data where needed are the responsibility of its operator.
3. Setting the tokens
- In the development instance the token has both reading and writing. The agent changes the applications there, and a possible error stays there.
- In the production instance reading is enough for the token. The agent does not need to change anything in production, the changes get there with a release. It needs reading to compare the two instances before a release.
- Writing in the production instance is enabled only temporarily, when data that a release does not transfer has to be written, typically new items of code lists. After the write it is switched off again.
- The two instances are connected to the AI tool as two servers. Their names are derived from the addresses of the instances (for example “portal-firma-cz” and “portal-firma-cz-dev”), so both the agent and the developer tell them apart reliably. The rule is described in the Claude Code, Codex and other tools guide.
4. Development
- The agent works in the rhythm described in the guide How agentic development works: it writes the changes of the applications into the development instance through the MCP server, and the developer verifies them directly in its portal. The agent's outputs are a proposal that has to be verified – a claim not supported by the documentation, the application model or the data of the instance is unverified.
- The developer keeps a list of changes of the upcoming release – which applications, forms, controls, view pages, scripts and queries change. Before the release, the difference between the instances is checked against this list.
- The agent does not rename or delete a database table or column without the developer's decision. Merging the structure deletes a renamed column in the production instance and creates it again, and its data are lost. The displayed name of a control can be changed safely – the identifiers stay.
- A release transfers the structure, not the data. Data that should be in production as well – typically new items of code lists – are written into the production instance separately: in the edit form, or through the MCP server with the change history.
- Program code (external functions, API) belongs to source control, and the “ngef.dll” library is copied into the production instance as part of the release.
5. Release to the production instance
A release transfers the whole application structure of the development instance into the production instance and keeps the production data. It is done with the “SqlBackup.exe” program – by exporting the structure in the development instance, a merge test and a merge in the production instance. The whole procedure, including assessing collisions, is described in the Development environment guide.
5.1. Before the release
- Comparison with the original state. The agent reads the application model of both instances – the production one by reading only – and lists the differences: added, changed and removed applications, edit forms, controls, view pages, scripts, queries and permissions. The developer compares the differences with the list of changes of the release. A difference that is not on the list – a change in progress or a change made directly in production – is resolved before the release.
- The merge test compares only the structure of the database tables. It does not compare scripts, queries or view pages. That is why both checks are made before the release.
5.2. Merging the structure
- The version of NET Genium is unified in the development and production instances.
- In the development instance, the structure is exported by the “SqlBackup.exe” program with the Database structure (merge) profile.
- The production database is backed up.
- In the production instance, the merge test – the Database structure (merge test) profile – is run and the developer goes through the “SqlBackup.htm” file. They have to be able to justify every deletion of a column, every rename and every change of a data type. Without that, the merge is not done.
- The merge is done – the Database structure (merge) profile. The User settings from old version option keeps the portlets, favorite items and view table settings of the users of the production instance.
- Files outside the database – the “ngef.dll” library and the libraries it uses, and the files in the “Config” directory – are copied into the production instance separately. “SqlBackup.exe” offers to take over the print templates during the merge.
The merge keeps the data of the production instance, the NET Genium Settings, the allowed IP addresses, the personal MCP tokens and the membership of users in user groups. Tables the development instance does not have are deleted by the merge – it first saves their data into the “Temp” directory.
Details
- Updating an application from an “nga” file is not suitable as a release: it first deletes the application and creates it again from the file, so it removes the references from other applications, and if the recreation fails after the deletion, the original application no longer exists (see Import and export of applications).
5.3. After the release
- The agent compares, by reading, the application model of the production instance with the development one – within the scope of the release they should match. Any remaining differences are explained.
- The development instance is restored from a current backup of the production database (see Restoring the development instance) so that further development starts from the actual state of production.
6. Restoring the development instance
The procedure that refills the development instance with the current state of production should be described in advance – who performs the restore, when, and in which steps. Its basis is a backup of the production database restored in the development instance by the “SqlBackup.exe” program, completed as needed with the external functions, the print templates and the file attachments. The procedure is described in the Development environment guide.
- The restore overwrites everything created in the development instance, including changes of the applications still in progress. It is therefore done after a release, when the verified changes are already in production, or knowing that the work in progress will be discarded.
- After every restore, the developers generate their token in the development instance again and change the value of the environment variable in which they keep it.
- The procedure should include what is switched off or reconfigured in the development instance after the restore so that it does not communicate with its surroundings as production does – typically sending e-mails and connections to external systems.
Details
- The restore carries the personal MCP tokens and the Administrators with access to the MCP server list of the production instance over to the development instance. A token generated earlier in the development instance stops working, and a token of the production instance starts working in the development instance too, with its permissions.
- The restore also carries over the NET Genium Settings of the production instance.
This guide belongs to the topic Applications that keep up on the page NET Genium AI.