Share via


Synchronize your changes

Synchronization keeps your local agent files in sync with the cloud-based Microsoft Copilot Studio service and helps teams collaborate and manage conflicting changes.

Understand synchronization operations

The Copilot Studio extension for Microsoft Visual Studio Code provides three core synchronization operations:

Operation Description Direction Safety
Preview Preview remote changes without applying them Cloud to Local No local changes
Get Download and apply remote changes to local files Cloud to Local Any changes to the same component show both versions and expect the local user to review and confirm which version to keep
Apply Upload local changes to Copilot Studio remote Local to Cloud Modifies the live agent immediately. If there are remote changes that occur since you cloned the agent, you get a pop-up to inform you. The pop-up recommends reviewing the changes before you apply them remotely. Users can't apply changes if there are remote changes that aren't yet retrieved through the get command. The apply icon and command are blocked. The apply action isn't the same as a publish operation in Copilot Studio, and doesn't publish the agent.

Screenshot of sync options as commands.

The Agent Changes pane

Access agent changes

  1. Select the Copilot Studio icon in the activity bar.

  2. The Agent Changes pane appears:

    AGENT CHANGES
    ├─ Agent 1
    │  ├─ Local Changes (1)
    │  │  └─ topics/greeting.topic.yaml
    │  └─ Remote Changes (1)
    |     └─ agent.yaml
    

Preview changes

Here are common scenarios for when to preview:

  • When you start your work session
  • Before you make major changes
  • When you work in a team environment
  • Periodically (every 30-60 minutes)

Preview with Agent Changes pane

  1. Open the Agent Changes pane.

  2. Select the Preview button.

Screenshot of preview changes.

  1. Wait for the preview to complete.

  2. Review the changes in the Remote Changes folder of the Agent Changes pane.

Screenshot of preview local and remote changes.

Preview with the command palette

  1. Press Ctrl+Shift+P.

  2. Enter: "Copilot Studio: Preview."

  3. Press Enter.

Get changes

Get downloads and apply remote changes to your local files.

When to get changes

The following are common scenarios for when to get changes:

  • After the preview command reveals remote changes
  • At the start of a work session
  • Before pushing your changes
  • When collaborating with others

How to get changes

Get changes with the Agent Changes pane

  1. Open the Source Control pane.

  2. Select Get.

  3. Confirm if prompted: "This action overwrites uncommitted local changes."

  4. Wait for the pull to complete.

  5. The changes are immediately applied to your file directory.

Get changes with command palette

  1. Press Ctrl+Shift+P.

  2. Type: "Copilot Studio: Get Changes."

  3. Press Enter.

Resolve conflicts

Screenshot of conflict action.

When both local and remote versions of a file change, you might see conflicts (which you should be aware of since you previously did a preview operation, which informs you of remote changes) when you perform a get operation.

You can then choose to revert the changes back to your original local version, or choose to keep the remote change, which is considered the "Latest change."

If you close the action window before addressing changes from operations, select the Open Changes icon on the topic that is changed (which is highlighted if it has actions pending).

Screenshot of open changes icon.

Apply changes

Select Apply to upload your local changes to Copilot Studio, updating the agent in your environment. This action doesn't publish your changes. After you apply your changes, test them by using the test pane in the Copilot Studio UI in the browser. You can start a conversation or use the trigger for workflows to begin testing.

Before you apply changes

Here are items to verify before applying your changes:

  • No unresolved merge conflicts
  • Preview and get run for the latest remote changes
  • Files pass validation (no errors in Problems pane)
  • Changes committed to Git (if using version control)
  • Permission to modify the agent

Users can't apply changes if there are remote changes that aren't yet retrieved through the get command. The apply icon and command are blocked.

Screenshot of apply blocked to sync.

When to apply changes

Here are common scenarios for when to apply your changes:

  • When you complete a feature or fix
  • When you finish your work session
  • When you want to test in cloud environment
  • When ready to share changes with team

How to apply changes

Apply changes with Agent Changes pane

  1. Open the Agent Changes pane.

  2. Review your changes in the Changes section.

  3. Select Apply.

  4. Wait for the push to complete.

Apply changes with command palette

  1. Press Ctrl+Shift+P.

  2. Type: Copilot Studio: Apply Changes.

  3. Press Enter.

Apply results

When you apply your changes, you see the latest status displayed in Visual Studio Code.