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.

Why an Ops Agent?

SRE and DevOps workflows often involve multiple tools: create a ticket in Jira Cloud, 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/rag

Quick 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:

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 — see the HazelJS RAG package for memory and retrieval options.

Learn More


@hazeljs/ops-agent is part of the HazelJS framework — a modern, TypeScript-first Node.js framework for building scalable server-side applications.