--- alias: user-guide-ai-agent description: "Manage AI Agent definitions that provide instructions and MCP server associations for AI interactions in Critical Manufacturing MES" --- # AI Agent The **AI Agent** page is used to manage the logical AI agents that can be used by **AI** interactions in Critical Manufacturing MES. An **AI Agent** stores the canonical definition of an agent inside MES, independently of the external runtime platform. This allows the system to manage both system-defined and user-defined agents in a consistent way. ## Overview Use an **AI Agent** to define: * The display information shown to users. * The instructions that describe how the agent should behave. * The **MCP Servers** that the agent is allowed to use. ## Main View Depending on the configuration, the main view can include the following sections: * **Details** - displays the main information of the **AI Agent**, such as the name, description, display name, and additional information. ![AI Agent Details section.](../images/ai_agent_details_page01.png) * **Instructions** - displays the AI Agent behavioural prompt. ![AI Agent Instructions tab.](../images/ai_agent_details_page_instructions.png) * **MCP Servers** - displays the **MCP Servers** associated with the **AI Agent** and their selected tools. ![AI Agent MCP Servers section.](../images/ai_agent_details_page02.png) * **Attachments** - shows the documents that are attached to the **AI Agent** and enables you to attach additional documentation to it. * **History** - displays previous changes to the **AI Agent**, when history tracking is available. ## Manage Instructions Instructions define how an **AI Agent** should behave when it processes a prompt. !!! warning "Supported Formatting" The system retains only the formatting supported by the Instructions editor during synchronization with LibreChat. To view or update instructions for a user-defined **AI Agent**: 1. Open the **AI Agent**. 2. Select **Instructions** on the Details View. 3. Select **Edit**. 4. Enter or update the instructions. 5. Save the **AI Agent**. ![Instructions Wizard to Manage Agent Instructions](../images/ai_agent_edit_instructions.png) Instructions for system-defined agents are read-only. Use a user-defined **AI Agent** when scenario-specific instructions are required. ## Select a Provider and Model When you create or edit a user-defined **AI Agent**, select the **Model** that the agent uses. The Provider is defined by the Generative AI deployment and is displayed as read-only when only one provider is available. For a system-defined **AI Agent**, administrators can update the **Model** only. The **Provider** remains read-only. The available models depend on the models configured for the environment. Contact your system administrator if the required model is not available. ## Manage MCP Servers Use **Manage MCP Servers** on an **AI Agent** to select the **MCP Servers** that the agent can use. 1. Open the **AI Agent**. 2. Select **MCP Servers** on the Details View. 3. Select **Manage**. 4. Add or remove the required **MCP Servers**. 5. Save the changes. The selected **MCP Servers** determine which tools are available to the **AI Agent** in the runtime. The system synchronizes the updated association with LibreChat. ![MCP Servers Wizard to Manage MCP Servers](../images/ai_agent_manage_mcp_servers.png) ## Terminate and Restore an Agent You can terminate a user-defined **AI Agent** from the page actions. System-defined agents cannot be terminated. Terminating an agent removes it from LibreChat and terminates its associations with **MCP Servers**. It does not terminate the associated **MCP Servers**. To restore a terminated agent, select **Unterminate**. If the agent is configured to publish to the runtime, the system synchronizes it with LibreChat. Before restoring the agent, ensure that all **MCP Servers** previously associated with it are active. After restoring the agent, use **Manage MCP Servers** to add the required associations again. ## Configuration Notes Keep the following behavior in mind when configuring an **AI Agent**: * Only administrators can create or update **AI Agents**. * For system-defined agents, only the **Model** is editable. * User-defined agents can be adjusted to support scenario-specific instructions and **MCP Server** associations. * For the LibreChat runtime, an optional **Display Name** can contain only letters and spaces. ## Synchronization with LibreChat The system synchronizes **AI Agents** and their associated **MCP Servers** with LibreChat, the current AI runtime. For more information about runtime availability and configuration, see [[user-guide-ai-librechat-integration|LibreChat Integration]]. ## Related Configuration * Use [[user-guide-ai-mcp-server|AI MCP Server]] to manage the tool servers available to agents. * Use [[user-guide-ai-prompt-configuration|Prompt Configuration]] to resolve an **AI Agent** for an AI capability. * Use [[master-data-excel-template-tutorial|Master Data Packages]] to create, update, or export **AI Agent** definitions in bulk.