Skip to content

Jira Agent

The jira agent connects to Jira Cloud (or Server) via REST API v3. It uses Basic auth (email + API token) to fetch issues, run JQL searches, add comments, and trigger status transitions. Source data is written to the workspace as JSON files. Target operations read from workspace files and post to Jira.

The agent also supports a notify handler, allowing event-driven Jira updates (e.g., transitioning a ticket when a pipeline escalates) without requiring a dedicated phase.


- name: fetch-ticket
agent: jira
action: get_issue
sources:
- name: ticket.json
ref: PROJ-123

ActionDirectionDescription
get_issueSourceFetch a single issue by key
get_commentsSourceFetch all comments on an issue
searchSourceRun a JQL query and return matching issues
add_commentTargetPost a comment to an issue
transitionTargetTrigger a workflow status transition
FieldTypeRequiredDescription
namestringYesUnique phase name within the workflow
typestringNoDefaults to "standard"
agentstringYesMust be "jira"
depends_onstring[]NoUpstream phases that must complete before this phase runs
actionstringYesOne of: get_issue, get_comments, search, add_comment, transition
sourcesSourceEntry[]For fetch actionsEntries to fetch from Jira
target_entriesTargetEntry[]For write actionsEntries to deliver to Jira
notifyobjectNoEvent-driven handler configuration
FieldTypeRequiredDescription
namestringYesOutput filename (written to .cliq/files/{phase}/{name})
refstringYesIssue key (e.g., PROJ-123) or JQL query string
FieldTypeRequiredDescription
namestringYesIdentifier for the operation
refstringYesIssue key to target (e.g., PROJ-123)
filestringYesWorkspace file containing comment text or transition ID

The Jira agent can respond to pipeline events via the notify block. When an event fires, the agent transitions the referenced ticket to a new status.

FieldTypeDescription
ticketstringIssue key to transition (supports template variables)
transition_tostringTarget status name (e.g., Blocked, Done)

Supported events: on_complete, on_escalate, on_fail.

notify:
on_escalate:
agent: jira
ticket: $(inputs.ticket)
transition_to: Blocked

Jira credentials are configured under agents.jira in settings.json:

KeyRequiredDefaultDescription
agents.jira.base_urlYesJira instance URL (e.g., https://your-org.atlassian.net)
agents.jira.emailYesAtlassian account email for API auth
agents.jira.api_tokenYesJira API token

Source operations return issue metadata; target operations confirm what was posted.

{
"data": {
"action": "get_issue",
"sources": {
"ticket": {
"ref": "PROJ-123",
"key": "PROJ-123",
"summary": "Fix login timeout on mobile",
"fields": {
"status": "In Progress",
"assignee": "[email protected]",
"priority": "High"
}
}
},
"targets": {}
},
"text": "## Jira Results\n\n✓ Fetched ticket — PROJ-123: Fix login timeout on mobile"
}
{
"data": {
"action": "search",
"sources": {
"bugs": {
"ref": "project = PROJ AND type = Bug AND status = Open",
"key": "search",
"count": 7
}
},
"targets": {}
},
"text": "## Jira Results\n\n✓ Searched bugs (7 issues)"
}
{
"data": {
"action": "add_comment",
"sources": {},
"targets": {
"comment": {
"ref": "PROJ-123",
"key": "PROJ-123",
"comment_id": "10042"
}
}
},
"text": "## Jira Results\n\n✓ Commented on PROJ-123"
}
{
"data": {
"action": "transition",
"sources": {},
"targets": {
"move-to-done": {
"ref": "PROJ-123",
"key": "PROJ-123",
"transition_id": "31"
}
}
},
"text": "## Jira Results\n\n✓ Transitioned PROJ-123"
}
FieldLocationDescription
refdata.sources.*, data.targets.*Issue key or JQL query string
keydata.sources.*, data.targets.*Jira issue key
summarydata.sources.*Issue summary text (get_issue only)
fieldsdata.sources.*Selected issue fields — status, assignee, priority, etc. (get_issue only)
countdata.sources.*Number of results (search, get_comments)
comment_iddata.targets.*ID of the created comment (add_comment only)
transition_iddata.targets.*ID of the executed transition (transition only)

Source operations write JSON to .cliq/files/{phase}/{source.name}:

  • get_issue — Full issue JSON including fields, changelog, and links
  • get_comments — Array of comment objects with author and body
  • search — Array of issue objects matching the JQL query

Reference handoff data in downstream phases using template variables:

- name: analyze
agent: cursor
prompt: |
Fix the bug described in $(handoff.fetch-ticket.sources.ticket.key):
$(handoff.fetch-ticket.sources.ticket.summary)

Example: Fetch a ticket and implement a fix

Section titled “Example: Fetch a ticket and implement a fix”

A developer pipeline that pulls issue details, implements a fix, then comments back.

phases:
- name: fetch-ticket
agent: jira
action: get_issue
sources:
- name: ticket
ref: $(inputs.ticket)
- name: implement
agent: cursor
depends_on: [fetch-ticket]
prompt: |
Implement a fix for $(handoff.fetch-ticket.sources.ticket.key):
$(handoff.fetch-ticket.sources.ticket.summary)
- name: comment-result
agent: jira
action: add_comment
depends_on: [implement]
target_entries:
- name: comment
file: .cliq/files/implement/summary.md
ref: $(inputs.ticket)

Pull open bugs via JQL and pass them to an LLM for prioritization.

phases:
- name: search-bugs
agent: jira
action: search
sources:
- name: bugs
ref: "project = MOBILE AND type = Bug AND status = Open ORDER BY created DESC"
- name: triage
agent: cursor
depends_on: [search-bugs]
prompt: |
Review the $(handoff.search-bugs.sources.bugs.count) open bugs
and produce a priority-ranked list with recommended assignees.

Example: Transition a ticket on pipeline completion

Section titled “Example: Transition a ticket on pipeline completion”

Use the notify handler to move a ticket to “Done” when the pipeline succeeds, or “Blocked” if it escalates.

phases:
- name: deploy
agent: cursor
role: deployer
notify:
on_complete:
agent: jira
ticket: $(inputs.ticket)
transition_to: Done
on_escalate:
agent: jira
ticket: $(inputs.ticket)
transition_to: Blocked

Pull existing comments on a ticket to give an LLM conversational context.

phases:
- name: fetch-comments
agent: jira
action: get_comments
sources:
- name: discussion
ref: PROJ-456
- name: summarize
agent: cursor
depends_on: [fetch-comments]
prompt: |
Summarize the discussion thread on PROJ-456 and identify
any unresolved questions.

  1. Find your Jira instance URL: https://your-org.atlassian.net (Cloud) or https://jira.your-company.com (Server/Data Center)
  2. Go to https://id.atlassian.com/manage-profile/security/api-tokens
  3. Click Create API token, name it (e.g., cliq), and copy it
  4. Confirm your account email at https://id.atlassian.com/manage-profile/email

Jira API tokens inherit the full permissions of your Atlassian account — no scope configuration needed.

Terminal window
cliq settings agents.jira.base_url "https://your-org.atlassian.net" --global
cliq settings agents.jira.email "[email protected]" --global
echo $JIRA_TOKEN | cliq settings agents.jira.api_token --stdin --global
cliq doctor agent jira