Project workspace
The project workspace allows for project-specific configuration of agents and MCP servers. The configuration is saved in the .coagent/ directory within the TwinCAT solution folder and is automatically activated when the solution is opened in Visual Studio.
Directory structure
.coagent/
├── COAGENT.md ← Projektspezifische Anweisungen
├── agents/ ← Projektspezifische Agenten-Definitionen
│ └── mein-agent/
│ └── agents.md
├── skills/ ← Projektspezifische Skills
│ └── mein-skill/
│ └── SKILL.md
└── mcp.json ← Projektspezifische MCP-Server-KonfigurationIntegration in the Solution Explorer
When a TwinCAT project with a .coagent/ folder is open in Visual Studio, a CoAgent Workspace node automatically appears in the Solution Explorer. The node contains the following sub-nodes:
Sub-node | Description |
|---|---|
Agents | Mirrors the contents of |
MCPs | Mirrors |
Changes to the file system are displayed immediately in the Solution Explorer. Double-clicking an entry opens the file in the editor. Instructions (COAGENT.md) and skills are not currently displayed in Solution Explorer. They are maintained in the file system (see below).
Configure agents
It is recommended that you create agents under Settings > Agents with the Workspace scope. The definition is located in agents.md in a separate subfolder of .coagent/agents/. The file format is described in the Agents chapter. New files and folders appear immediately in the Solution Explorer.
Instructions and skills
A file named COAGENT.md contains instructions that are applied in every chat. Skills are reusable procedures that are stored as SKILL.md files in a separate subfolder and loaded by the agent as needed. Both can be stored globally or on a per-project basis:
Location | Instructions | Skills |
|---|---|---|
Global | %PROGRAMDATA%\Beckhoff\TwinCAT\Functions\CoAgent\COAGENT.md | %PROGRAMDATA%\Beckhoff\TwinCAT\Functions\CoAgent\skills\<name>\SKILL.md |
Project workspace | .coagent\COAGENT.md | .coagent\skills\<name>\SKILL.md |
Global and project-specific instructions are used together. A project skill overrides a global skill with the same name. Skills from installed add-ons are prefixed with the add-on’s name (e.g., plc:deploy) and therefore do not conflict with your own skills.
Agent files, COAGENT.md, Skills, .coagentignore, mcp.json, settings files, and text attachments are read as UTF-8, UTF-16, or ANSI, with or without a byte order mark. This includes files created with Windows PowerShell 5.1. Files saved by CoAgent are always in UTF-8.
Configuring the MCP servers
Project-specific MCP servers are configured in .coagent/mcp.json (see the chapter Custom MCP servers).
![]() | The project workspace opens automatically when the TwinCAT Solution is opened and closes again when the Solution is closed. |
