Use the AI Agent to plan and build a project

To plan and build a project using the AI Agent, open an
AI Agent Session
from the
AI Agent Explorer
. Use the
AI Agent Session
to:
  • Upload files that contain design artifacts for the AI Agent to reference when creating your project plan. Files can include content such as specifications, diagrams, Logix Designer .L5X files, and spreadsheets.
  • Prompt the AI Agent to use uploaded files to create your project plan. For example, add a controller or routines from an .L5X file.
  • Prompt the AI Agent to build your project based on the plan.
To use the AI Agent to plan and build a project
  1. In the explorer bar, select AI Agent Explorer
    AI Agent Explorer
    , and then at the top of
    AI Agent Explorer
    , select
    AI Agent Session
    .
    TIP:
    When planning your project,
    Session in Progress (Plan)
    appears in
    AI Agent Session
    .
  2. To upload files:
    1. At the bottom of
      AI Agent Session
      in
      Ask AI Agent
      , select Upload files
      Upload files
      .
    2. In
      Upload files for AI Agent
      , drag and drop files or select
      Browse
      to select files on your computer.
      TIP:
      You can upload .md, .L5X, .pdf, .jpg, .jpeg, .png, .gif,. txt, .xls, .xlsx, .csv, .doc, and .docx file types. When the file type is ready to upload, appears next to the file. If you decide not to include a displayed file into your plan, after the file, select Delete
      Remove file
      .
    3. Select
      Upload
      .
  3. To open an uploaded file:
    1. In
      AI Agent Explorer
      , expand
      Files
      , and then double-click a file from either subfolder:
      • User-uploaded files
        . Files that you have uploaded. User-uploaded files are preceded by .
      • AI Agent-generated files
        . Files that the AI Agent created. AI Agent-generated files are preceded by Copilot Generated Document.
        TIP:
        In
        AI Agent-generated files
        , the AI Agent creates and maintains a project .md file that serves as the project overview. This file is automatically updated as changes are made, summarizing project content such as controller information, devices, Add-On Instructions, tasks, programs and routines, data types, and parameter connections.
    2. Double-click the file to open.
      TIP:
      You can preview .md, .csv, and .txt files. You cannot open .L5X files. Open the AI Agent-generated markdown summary from
      AI Agent-generated files
      in
      AI Agent Explorer
      . For markdown files, select
      Preview
      to view the rendered content or select
      Editor
      to view the markdown source.
      Read-only files display
      Read-only
      .
  4. To modify a file:
    1. Open the file and select
      Download
      to save the file locally.
    2. Make the required changes to the downloaded file.
    3. Upload the modified file again.
  5. Prompt the AI Agent to perform tasks using the content available in any of the uploaded files:
    1. In
      AI Agent
      at the bottom of the planning session, enter a prompt. For example, using the full name of an uploaded .l5x file, prompt the AI Agent to summarize the included content such as Add-On Instructions, parameters, routines, and functional descriptions.
      TIP:
      Frequently used prompts include:
      • Summarize the contents of
        <name of file>
        .
      • Create a detailed list of routines in
        <name of file>
        .
      • Create sequence diagrams for
        <name of file>
        .
      • Create flow diagrams for
        <name of file>
        .
      • Create a plan based on the uploaded specification.
    2. Press
      Enter
      or select Send
      Send
      .
      TIP:
      The AI Agent works best through conversation. After each response, review the output and provide follow-up prompts to clarify, correct, or expand on the results. The AI Agent can make mistakes, so refining your plan through multiple exchanges improves the quality of the final build. Providing more detail improves the results.
      Tips for better results: Be specific. Include names, parameters, and behavior details in your prompts. For example,
      Create a pump Smart Object named PMP001 with start/stop logic
      produces better results than
      Make a pump
      . If the first result is not right, tell the AI Agent what was wrong and ask it to try again. Always review generated code before accepting. The AI Agent is a productivity tool, not a substitute for engineering judgment.
      TIP:
      appears before each user prompt and Copilot indicator appears before each AI Agent response. The AI Agent may present the requested information or ask for additional clarification. When the AI Agent completes a task, quick prompts for common actions may appear above the AI Agent input line.
      TIP:
      To clear a prompt and its response from your session history, select Delete
      Delete
      next to the prompt. To clear the entire session history, in the upper-right corner of
      AI Agent Session
      , select
      Clear session history
      .
  6. (optional) To provide feedback on AI Agent responses:
    1. After an AI Agent response, select Send feedback
      Send Feedback
      .
    2. In
      Response Feedback
      , select
      Like
      or
      Dislike
      .
    3. In
      Feedback
      , enter your feedback.
    4. Select
      Submit
      to submit your feedback.
  7. To generate the plan, above
    AI Agent
    , select
    Generate plan
    .
    TIP:
    To generate the plan, you can also type the prompt
    generate plan
    in
    Ask AI Agent
    , and then press
    Enter
    . When the plan is generated, the AI Agent displays a description of the plan and may prompt you to provide project details, specifications, or files to refine the plan.
    TIP:
    To stop generating a plan or any response, select Stop Generating
    Stop Generating
    .
  8. To validate the plan before execution, select
    Validate plan
    , or in
    AI Agent
    , type the prompt
    validate plan
    , and then press
    Enter
    . The AI Agent reviews the plan for completeness and correctness before building.
  9. To have the AI Agent make changes to the plan, select
    Update plan
    , or in
    AI Agent
    , type the prompt
    update plan
    , and then press
    Enter
    .
  10. To implement the plan, select
    Execute plan
    , or in
    AI Agent
    , type the prompt
    execute plan
    , and then press
    Enter
    .
    TIP:
    The
    Execute plan
    quick prompt is only visible when there is at least one uncompleted, validated plan. When building your project,
    Session in Progress (Build)
    appears in the top-left of
    AI Agent Session
    . As
    AI Agent Build Agent
    implements your plan, you can view the markdown file that the AI Agent generated to monitor the build progress. A blue dot appear on the tab of the plan markdown file while it is still updating. You do not need to keep the markdown file open to monitor the build. The blue dot remains visible on the tab even when you are working in other files, so you can continue working and check back at any time.
    The Build agent either successfully completes all steps in the plan or stops when it encounters blocked steps. When steps are blocked, the Build agent provides a reason for each block and may suggest options to proceed. Possible options include:
    • Prompt the AI Agent to retry all steps.
    • Prompt the AI Agent to retry specific blocked steps.
    • Select
      Continue Planning
      to return to Plan mode and modify the plan to address the blocked steps.
    When all plans are complete and no further changes are needed, in
    AI Agent Session
    , select
    Finish Session
    to clear the session history and start a new plan and build session.
    If at least one existing plan is incomplete, the
    Continue Planning
    quick prompt appears above the AI Agent input line. Select
    Continue Planning
    to return to Plan mode and work with an incomplete plan.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal