--- alias: user-guide-ai-prompt-configuration description: "Resolve AI Agents for capabilities in Critical Manufacturing MES" --- # Prompt Configuration When you open the **AI** panel, the system sends context information to the resolved **AI Agent**. This context can include: * The entity ID and type. * The IDs of documents and attachments selected from the entity. * The instructions defined on the AI Agent. The **AI Agent** defines its behavior, model, instructions, and MCP Server associations. The [[aiagentcontext-st|AIAgentContext]] SmartTable only resolves the agent to use for an AI capability. !!! info "AI Agent Resolution" Configure the `AIAgentContext` Smart Table to resolve AI Agents by capability. For version 12.0.0 migration instructions, see the [AI Agent Context Migration Guide](https://developer.criticalmanufacturing.com/explore/guides/migration/version-specific/1200/ai_agent_context_1200/). ## Configure AI Agent Resolution 1. Go to **Administration > Tables > Smart Tables**. 2. Open the [[aiagentcontext-st]] Smart Table. 3. Create or edit an entry. 4. Define the configuration fields: * **Capability** - select the AI capability that requires an agent. * **Agent** - select the AI Agent to use for that capability. * **Startup Prompt** - optionally, define a prompt that runs automatically when the selected AI Agent starts. For the available capability values, see [[aiagentcontext-st|AIAgentContext]]. ### Configure the Default MES AI Agent The main **AI** page resolves its default agent through the **General Assistance** capability. A standard MES installation maps this capability to **CM MES Agent**. To replace the default agent, create or edit an **AIAgentContext** entry with the following values: * **Capability** - `General Assistance` * **Agent** - the AI Agent to use as the default **AI** agent. ## Related Configuration Use the following pages to complete the configuration: * [[user-guide-azure-openai|Azure OpenAI]] - configure the Azure AI Foundry side of the integration. * [[user-guide-ai-administration-index|AI Administration]] - understand how capabilities, agents, and MCP servers work together. * [[user-guide-ai-agent|AI Agent]] - manage agent instructions and MCP server associations. * [[aiagentmodelconfiguration-st|AIAgentModelConfiguration]] - configure model parameters resolved for an AI Agent. * [[user-guide-ai-mcp-server|AI MCP Server]] - manage the tool servers available to the runtime.