
AI-Powered Ops: Jira, Slack, and Incident Triage with @hazeljs/ops-agent
Introducing @hazeljs/ops-agent — an AI-powered DevOps assistant that creates Jira tickets, posts to Slack, and coordinates incidents through natural language. Built on the HazelJS Agent Runtime with built-in Jira and Slack adapters.
Introduction
Meet @hazeljs/ops-agent — an AI-powered DevOps assistant that understands natural language and executes real actions. Create Jira tickets, post to Slack, coordinate incidents, and triage issues through a single conversational interface. It builds on the HazelJS Agent Runtime and comes with built-in Jira and Slack adapters ready for production.
Why an Ops Agent?
SRE and DevOps workflows often involve multiple tools: create a ticket in Jira, notify the team in Slack, add a comment, look up runbooks. Manually switching between these tools during an incident is slow and error-prone. The Ops Agent lets you say things like:
- “Create a Jira ticket in PROJ for database connection pool exhaustion and post to #incidents”
- “Add a comment to PROJ-123 with the latest status and notify #sre”
The agent parses your intent, calls the right tools with the right parameters, and confirms what it did. Sensitive actions like creating tickets or posting to Slack can require approval, so you stay in control.
Installation
npm install @hazeljs/ops-agent @hazeljs/ai @hazeljs/agent @hazeljs/core @hazeljs/ragQuick Start
Configure the Jira and Slack tools, create the runtime, and run the agent:
import { AIEnhancedService } from '@hazeljs/ai';
import { createOpsRuntime, runOpsAgent, createJiraTool, createSlackTool } from '@hazeljs/ops-agent';
const jiraTool = createJiraTool();
const slackTool = createSlackTool();
const runtime = createOpsRuntime({
aiService: new AIEnhancedService(),
tools: { jira: jiraTool, slack: slackTool },
model: 'gpt-4',
});
const result = await runOpsAgent(runtime, {
input: 'Create a Jira ticket in PROJ for DB pool exhaustion and post to #incidents.',
sessionId: `ops-${Date.now()}`,
});
console.log(result.response);
console.log(`Completed in ${result.steps} steps (${result.duration}ms)`);Configuration
For real Jira and Slack integration, set these environment variables:
OPENAI_API_KEY— Required for the LLMJIRA_HOST,JIRA_EMAIL,JIRA_API_TOKEN— For Jira Cloud REST APISLACK_BOT_TOKEN— For Slack Web API (chat.postMessage)
Without Jira or Slack credentials, the adapters return placeholder responses so you can develop and test locally. Set the env vars when you’re ready for production.
Tools
The Ops Agent exposes four tools to the LLM:
- create_jira_ticket — Create issues with project, summary, description, and optional labels (requires approval)
- add_jira_comment — Add comments to existing issues
- get_jira_ticket — Fetch issue details by key
- post_to_slack — Post messages to channels, optionally in threads (requires approval)
RAG and Persistent Memory
Optionally pass a ragService so the agent can search runbooks and docs before suggesting actions. Use a custom memoryManager (e.g. Redis) for persistent conversation history across sessions.
Learn More
For full API reference, custom tools, and advanced configuration, see the Ops Agent Package documentation. The HazelJS example app includes a complete demo at example/src/ops/ops-agent-example.ts.