Work with Jira Coding Agent in automations

Use Jira Coding Agent in automations to automatically generate code for repetitive tasks at scale so your team can focus on high valuable work.

How Jira Coding Agent works in automations

An automation flow for Jira Coding Agent uses the standard building blocks of Jira automation:

  • A trigger to kick off the execution of your flow, for example when a work item is updated.

  • Conditions to narrow the scope of your flow, for example when a specific label is added to the work item.

  • An action to perform the task you want to automate. With Use Jira Coding Agent action you can add other follow-up actions too.

When a Jira work item meets your flow conditions, the automation runs. The Use Jira Coding Agent action connects the Jira Coding Agent to a repository so it can make code changes and opens a draft pull request. It doesn’t merge the pull request directly, but hands it back to your team for review and merge.

Find out how Jira Cloud Automation works in general

The Jira Coding Agent runs in a restricted mode in automations and doesn’t use Atlassian Teamwork Graph context. This means that the Jira Coding Agent won’t read Confluence content that the connected user has access to.

Automation flows using the Jira Coding Agent will count towards automation limits of your Jira plan.

Read about Jira plans and pricing


Before you begin

To create and manage automation flows using the Jira Coding Agent, make sure:

You must be a Jira space admin to create and manage space automation flows. However, any Jira user can trigger those flows, either manually or when a work item meets the flow’s conditions.

Sessions generated by the Use Jira Coding Agent action are owned by the action’s connection owner. Understand connections in automation


Create an automation flow to generate code

Define your common coding patterns and use the Jira Coding Agent to automatically generate code for repetitive tasks.

Start by automating small, low-risk tasks with the Jira Coding Agent automation actions. As you get comfortable, expand to more scenarios and complex tasks.

To create an automation flow to generate code:

  1. In your Jira space, select More actions () next to your space name, then select Space settings.

  2. In the sidebar, select Automation.

  3. Select Create flow.

  4. Under Add a trigger, select a trigger, set it up, then select Next.

  5. Select Add step, then Add an action.

  6. Under Add an action, search for and select Use Jira Coding Agent.

  7. Select a connected repository from the list, or select Infer repository from work item if you will add repository details to your work item descriptions.

    1. Select Settings () to configure the branch name and source branch, and whether to create a draft pull request after each automation.

  8. In the Prompt field, give the Jira Coding Agent instructions on the code you want to generate.

  9. Select Next.

  10. Select Turn on flow.


Things to keep in mind

  • To see when a flow was triggered and code was generated, view the audit log

  • The time required for the flow to run depends on repository size and complexity of the task.

  • The connection owner’s Rovo credits are used when the flow runs. What are connections in Automation?

When the flow runs, the Jira Coding Agent makes code changes on a branch and creates a draft pull request in the repository you provided. You can review the pull request directly in the repository, or open the Jira work item and use the repository link under:

  • the Development section in the Details panel

  • the Agents section

The Agents section displays all agentic sessions related to that work item, including sessions owned and managed by other users.

Find the Jira Coding Agent for sessions you own to review the changes, make any edits you need, then approve and merge the pull request when you’re ready.


Use smart values

Smart values change the behaviour of flows based on specific criteria. Understand smart values in automation

This means, smart flows can be used in the repository and prompt fields of the Use Jira Coding Agent action.

For example, using the {{issue.labels}} smart value, you could get the Jira Coding Agent to code in one repository or another based on the work item label.

The Use Jira Coding Agent action also outputs smart values to use in other automation steps:

Smart value

Description

{{jiracodingagent.codeGeneration.jobId}}

ID of the coding session

{{jiracodingagent.codeGeneration.repoUrl}}

URL of the repository

Consider how you might use templates for Jira Coding Agent automations

Still need help?

The Atlassian Community is here for you.