Prerequisites
- A Pro or Enterprise plan. The Integration trigger requires an Enterprise plan.
- A Mintlify project connected to a GitHub or GitLab repository
- For GitHub: the Mintlify GitHub App installed on every repository you plan to use in the automation
- For GitLab: a connected GitLab account (see GitLab setup below)
Create a custom automation
The agent runs in an isolated sandbox with restricted internet access. It cannot install additional packages or tools at runtime. Prompts that reference unavailable tools may produce unexpected results or fail.
- Open the Automations page in your dashboard.
- Click New automation.
- On the configure page, set the automation name, trigger, prompt, context repositories, integrations, and update mode. For details on each field, see Configurations.
- Click Save.
Write effective instructions
Effective automation instructions focus on a single task and define a clear, verifiable outcome. Automations can vary because agents may produce different results for the same instructions, but well-formatted instructions produce more consistent results.- Describe the outcome. Tell the agent what a successful run should look like.
- Write a procedure. Give the agent a step-by-step guide to follow.
- Keep scope narrow. Split complex tasks across multiple automations rather than combining them into one prompt.
Open multiple pull requests or append to open ones
Each run of a custom automation can open zero, one, or several pull requests. The agent opens separate pull requests when the work splits into independent changes that you should review separately. Each pull request starts from your deploy branch, so it doesn’t carry commits from the others. By default, every run opens new pull requests. To have the agent add commits to a pull request that an earlier run of the same automation opened, say so explicitly in your instructions. The agent sees up to five of the automation’s open pull requests. It can only append to or update pull requests that the same automation opened.Example instructions
Test your automation
Test a new automation with a manual run so you don’t have to wait for its trigger to occur. Manual runs use the automation’s current configuration and appear in the run history alongside automated runs. You cannot manually run automations with an integration or webhook trigger. Send an event or webhook request instead. See Run an automation manually to choose the scope for a test run. Review the run in the run history to see the prompt, the files the agent changed, and any pull request it opened. If the result isn’t what you expected, update your instructions and run it again.GitLab setup
To use GitLab repositories in an automation, connect each project in the GitLab OAuth section of the Git settings page. Connect every repository the automation touches—your documentation repository and any trigger or context repositories. You must have at least the Maintainer role on each project.Automations require a paid GitLab tier. The agent uses short-lived project access tokens for repository access, which GitLab’s Free plan does not support.
Edit a custom automation
- Open the Automations page in your dashboard.
- Click the settings button on the automation’s card to open its configure page.
- Update any of the fields described in Configurations.
- Click Save.
Delete a custom automation
Deleting an automation is permanent and removes its configuration and run history.- Open the Automations page in your dashboard.
- Click the settings button on the automation’s card to open its configure page.
- Click Delete automation at the bottom of the page and confirm.