Overview
The TwinCAT 3 CoAgent enables the engineering process to be supported by large language models (LLMs). It provides a chat-based interface within the TwinCAT development environment that allows users to interact with specialized AI agents.
An agent establishes a connection between an LLM and a defined task scope and the tools available for that purpose. The active agent is chosen from a drop-down menu in the header bar. Depending on the agent, different tools are available for handling the respective engineering tasks.
CoAgent provides access to the following functional areas:
- PLC Code development (PLC agent): PLC code in Structured Text (IEC 61131-3) is generated, analyzed, refactored, and searched. Changes to POUs are reviewed in the changeset before they are applied (see the Changeset Workflow chapter).
- Hardware configuration (System Manager agent): TwinCAT projects, I/O devices, and EtherCAT topologies are configured. Whether confirmation is required before changes and deployments depends on the tool approvals.
- Documentation Search (InfoSys Explorer): The Beckhoff documentation (InfoSys) is searched. Answers are derived exclusively from the documentation and include source references.
The integration with LLM providers can be established either via cloud services or locally hosted models. Providers, models, and MCP servers can be viewed through the settings in the user interface.
For a representation of how all components (LLM integration, MCP server, agents) work together, see the System architecture chapter.