The goal was to create a dedicated engineering environment for the agent on our NVIDIA Jetson, with clear knowledge sources, limited access, and a protected network.
Hardware and isolation
The computing platform is an NVIDIA Jetson AGX Thor, a device with plenty of memory and processing power, built for AI workloads. I set up a separate Ubuntu virtual machine on it using KVM/QEMU. I figured the agent would need sudo privileges anyway, and giving it access to the entire Jetson with production data felt risky. Codex is installed inside the VM: the agent can work with files, configure dependencies, and run the tools needed for engineering tasks.
I made a deliberate decision to put the security controls outside the virtual machine. The agent has full privileges inside its Ubuntu environment, but it cannot manage the network security or VPN keys. Its external access goes through a network that it does not control.
For anyone still concerned about the confidentiality of data sent to Codex, I addressed this by not passing shared folders, physical disks, the GPU, or access to industrial network segments through to the VM. The agent works only with raw accumulated data and has no access to the shared context. This includes, for example, the RAG context, the history of readings accumulated in ClickHouse, and raw descriptions of PLC signals.
Traffic from the Ubuntu VM goes through a VPN running on the Jetson host. I configured sing-box with a primary VLESS Reality profile and a backup VLESS WebSocket profile with TLS, with several connection options in case of blocks or lag. The network rules block direct internet access, local networks, DNS outside the tunnel, and any IPv6 route that bypasses the VPN. If the VPN stops, the VM loses external access. The VM itself can only be accessed through the Jetson’s administrative access.
Documents and instructions for the agent
To make sure the agent always has up-to-date information about how the system works, I prepared a working knowledge base for a test machine. It contains manuals, electrical and mechanical schematics, anonymised PLC/HMI/Motion exports, signal maps, register and alarm tables, translations, and engineering analyses. The context is huge: about 1.3 GB of various text materials, plus another 1.5 GB in a separate repository containing the analysis of these engineering materials.
Connected services: the agent’s hands, eyes, and ears
- Linear — a cloud source of project context. Codex accesses its API through the VPN. We have already accumulated a large body of analysis in Linear.
- RAGFlow — search across the prepared knowledge base, accessed through a TCP proxy via its API. I wrote a separate article about RAGFlow: https://johngear.dev/articles/how-to-build-a-local-ai-agent-for-factory-documentation.html.
- ClickHouse — a source of production data. I created a separate read-only account for the agent, with permission to read the required databases. The connection allows it to query data and the signal catalogue. Traffic to internal services follows the designated local route, which makes queries faster.
API keys and credentials are stored in protected files inside the VM and do not appear in commands, logs, or the agent’s responses. For each service, I checked the full connection and a working use case: an API request, a knowledge search, and a database read.

How the workflow works
An engineering task starts with the project documentation. Codex reads the prepared AGENTS.md, selects the relevant instructions and source, and then searches RAGFlow, Linear, ClickHouse, or the local database containing almost 3 GB of data. It can then carry out analysis, train models, and produce verifiable conclusions with links to the knowledge base. Most importantly, all data is read-only, so the agent cannot change the production database or send commands to the controller; the isolated environment and TCP protocol do not allow it.
The infrastructure is now in place. I have run some tests: the agent navigates the context well and is already demonstrating its value. It is important to understand that this kind of autonomy lets the agent carry out work independently within a predefined environment and set of rules. I will still assign the work and manage the results.
Conclusion
The result is a well-connected system: Jetson AGX Thor, an isolated Ubuntu VM, Codex, a protected VPN gateway, an engineering archive, Linear, RAGFlow, and ClickHouse with read-only access. The architecture gives the agent enough freedom to handle complex engineering work independently while limiting the consequences of mistakes.
My main contribution here was to design and build an autonomous agent that can significantly improve the quality of our analysis and speed up ML experiments, while staying within defined boundaries and protecting production safety.
