Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.xhipai.com/llms.txt

Use this file to discover all available pages before exploring further.

Jira

Search, create, update issues, and add comments in Jira using the Jira REST API v3.

Quick Start

import { Agent, openai, JiraToolkit } from "@agentium/core";

const jira = new JiraToolkit({
  baseUrl: "https://yourcompany.atlassian.net",
  // Uses JIRA_EMAIL and JIRA_API_TOKEN env vars
});

const agent = new Agent({
  name: "project-manager",
  model: openai("gpt-4o"),
  instructions: "Help manage Jira issues and sprints.",
  tools: [...jira.getTools()],
});

const result = await agent.run("Find all open bugs in the PROJ project");

Config

baseUrl
string
required
Jira instance base URL (e.g. "https://yourcompany.atlassian.net").
email
string
Atlassian account email. Falls back to JIRA_EMAIL env var.
apiToken
string
Jira API token. Falls back to JIRA_API_TOKEN env var.

Tools

ToolDescription
jira_search_issuesSearch issues using JQL (Jira Query Language).
jira_get_issueGet full details of an issue by key (e.g. PROJ-123).
jira_create_issueCreate a new issue with project, summary, type, and priority.
jira_update_issueUpdate fields or transition status on an existing issue.
jira_add_commentAdd a comment to an issue.

Environment Variables

export JIRA_EMAIL="you@company.com"
export JIRA_API_TOKEN="ATATT..."
Create an API token at id.atlassian.com/manage-profile/security/api-tokens.

Tool Usage Examples

Search Issues with JQL

const result = await agent.run("Find all high-priority bugs assigned to me in the PROJ project");

// The agent calls jira_search_issues with:
// { jql: "project = PROJ AND type = Bug AND priority = High AND assignee = currentUser() ORDER BY created DESC" }
//
// Returns:
// PROJ-142 — Login timeout on slow networks (High, In Progress)
// PROJ-138 — Dashboard charts not rendering (High, Open)

Create Issue

const result = await agent.run(
  "Create a story in PROJ: 'Add dark mode support' with high priority. " +
  "Description: Implement dark mode toggle in user settings."
);

// The agent calls jira_create_issue with:
// {
//   project: "PROJ",
//   summary: "Add dark mode support",
//   issueType: "Story",
//   priority: "High",
//   description: "Implement dark mode toggle in user settings."
// }

Transition Issue

const result = await agent.run("Move PROJ-142 to 'In Review'");

// The agent calls jira_update_issue with:
// { issueKey: "PROJ-142", transition: "In Review" }

Add Comment

const result = await agent.run(
  "Add a comment to PROJ-138: 'Root cause identified — missing polyfill for Chart.js. Fix in PR #245.'"
);

// The agent calls jira_add_comment with:
// {
//   issueKey: "PROJ-138",
//   body: "Root cause identified — missing polyfill for Chart.js. Fix in PR #245."
// }