Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
[This article is prerelease documentation and is subject to change.]
Use triggers to create autonomous agents powered by the GitHub Copilot harness. Autonomous agents run when an event occurs in a connected service. For example, an agent can respond when an item is created in SharePoint, an email arrives, or a scheduled time occurs.
The trigger sends event details to the agent. Your agent's instructions and tools determine what the agent does with those details.
Note
Features in this article are used by agents or workflows powered by the GitHub Copilot harness.
Usage-based billing applies to using, building, testing, and evaluating agents. These actions might consume Copilot Credits. Learn more in Manage costs for agents powered by the GitHub Copilot harness.
[This article is prerelease documentation and is subject to change.]
Before you add a trigger
Before you add a trigger:
- Add the tools the agent needs to complete its task. Learn more in Add a tool to an agent.
- Write agent instructions that tell the agent how to handle the event details and when to use each tool. Learn more in Configure agent details and instructions.
Add and configure a trigger
Open the agent in Copilot Studio.
Select Triggers.
Select the trigger.
Configure the trigger:
- Configure the connection used for the trigger. If you see a green checkmark, your connection is working. If you don't see a green checkmark, select the account, then choose a different account or create a new connection.
Note
Some triggers, such as Recurrence and Copilot and Teams triggers, don't require a connection verification.
Optionally, add extra instructions you want to send to your agent for this trigger. This step is particularly important when you have multiple triggers in your agent and each trigger drives the agent execution differently.
Configure the Trigger options that determine when the agent should be invoked when the trigger event is picked up.
If you're sharing this agent with others to use, choose which options users can or can't configure themselves by turning on or off Editable by user for each option.
Expand Advanced parameters to configure any advanced parameters you need.
Select Add trigger.
Test and publish the agent
Test every trigger before you publish the agent.
Test a trigger by selecting the testing flask (
) button. To get to the button, either:- Select the trigger from the Build tab.
- Open the Preview tab.
Do one of the following:
- Select Start listening for the first test. Generate an event that matches the trigger configuration, such as sending an email or creating a SharePoint item. Your agent waits for the trigger event to occur, and reacts as a test. Based on the results, modify your agent's instructions, tools, trigger customization, or message to match your needs.
- Choose a previous trigger event (last email, file, and so on) from the Test with previous trigger events list. This action invokes the agent with that trigger event.
Publish and activate an autonomous agent
The agent doesn't run autonomously until you publish it. Republish the agent after you change a trigger, its instructions, or its tools. Updating an agent prompts users to accept the new changes.
Select Publish to update the latest version of the agent with the trigger.
After publishing, use the success dialog to choose who you want to use the agent:
- Activate for myself: Only you, the maker, can use the agent, using your own maker credentials.
- Share with others: Allow other users use the agent, with their own credentials. You also need to share the agent with those users.
Activate for me
Note
Autonomous agent usage is billed according to Copilot Studio billing rates.
Activate for me takes you to Agent management, where you turn on the agent. After you turn on the agent, your agent starts running on your behalf.
You can also access Agent management and activate your autonomous agent from the link under the agent name.
Share with others
To let people use an autonomous agent with their own credentials, configure its triggers and tools for user authentication, and then share the published agent. Recipients complete any required connections and can edit only the trigger options that you allow.
Note
Each end user's autonomous agent usage is totaled and billed through the underlying environment where the agent is hosted. Learn more in Overview of billing for agents powered by the GitHub Copilot harness.
Learn more in Share an autonomous agent. For instructions for end users setting up a shared agent, go to Set up a shared autonomous agent.