All Projects

๐Ÿค– AI DevOps Workflow Bot

๐Ÿค– Slack bot that interprets natural language CI/CD commands using hybrid regex + OpenAI gpt-4o-mini NLU. Executes Azure DevOps pipelines, checks service health, and manages stateful confirmation flows with 1-hour thread context TTL.

AI / Backend EngineerGluwa / 2023โ€“2024

Stack

NestJSTypeScriptOpenAI API (gpt-4o-mini)Slack Web APIAzure DevOps REST APIAzure DefaultAzureCredentialSlack Block Kit

AI DevOps Workflow Bot

๐Ÿ”ญ Overview

An AI-powered Slack bot that lets engineers manage CI/CD pipelines using natural language. Instead of navigating Azure DevOps manually, engineers type commands in Slack like "deploy the auth service to staging" or "check if production is healthy" โ€” and the bot understands, confirms, and executes.

โ“ The Problem

Azure DevOps pipeline management requires navigating multiple UIs, finding the right pipeline, selecting environments, and clicking through confirmation dialogs. For a team running frequent deployments across multiple environments, this friction adds up. The goal was a conversational interface that reduces this to a Slack message.

๐Ÿ› ๏ธ What I Built

๐Ÿง  Hybrid NLU Architecture

  • โšก Regex-first: common, high-confidence commands (deploy X to Y, check health, list pipelines) are handled by deterministic regex patterns with zero latency and zero API cost
  • ๐Ÿค– OpenAI fallback: ambiguous or complex commands fall through to gpt-4o-mini for intent classification and parameter extraction
  • ๐Ÿ”€ This hybrid approach ensures fast, reliable handling of common cases while maintaining flexibility for novel phrasings

๐ŸŽฏ Intent & Entity Extraction

  • ๐Ÿ“‹ Intent categories: TRIGGER_PIPELINE, CHECK_HEALTH, LIST_PIPELINES, CANCEL_RUN, GET_STATUS
  • ๐Ÿ” Entity extraction: service name, environment (dev/staging/prod), pipeline ID, branch
  • ๐Ÿ“Š Confidence thresholds: low-confidence classifications trigger a clarifying question rather than executing

๐Ÿ’ฌ Conversation State Management

  • ๐Ÿงต Thread-based context: each Slack thread maintains its own conversation state
  • โฑ๏ธ 1-hour TTL on thread context โ€” stale contexts are discarded to prevent confused multi-turn interactions
  • โœ… Confirmation flow: dangerous operations (production deploys) require an explicit "confirm" reply before execution

โ˜๏ธ Azure DevOps Integration

  • ๐Ÿ”Œ Azure DevOps REST API for pipeline triggering, status polling, and run cancellation
  • ๐Ÿ” Azure DefaultAzureCredential for enterprise IAM (supports managed identity, service principal, CLI auth)
  • โš™๏ธ Azure App Configuration for dynamic per-environment service registry

๐Ÿ“ฑ Slack Output Formatting

  • ๐ŸŽจ Rich Block Kit responses with pipeline status, run URLs, environment tags, and action buttons
  • โš ๏ธ Error responses with actionable next steps
  • ๐Ÿ“Š Health check summaries formatted as structured service status tables

โญ Key Highlights

  • โšก Hybrid regex + LLM architecture: common cases are fast and free, edge cases are handled by OpenAI
  • ๐Ÿ›ก๏ธ Stateful confirmation flows prevent accidental production deployments
  • ๐Ÿงต Thread-level context management with TTL for clean multi-turn interactions
  • ๐Ÿ” Enterprise IAM via Azure DefaultAzureCredential
  • ๐ŸŽฏ Practical AI engineering: LLM used for what it's good at (intent parsing), not as a product gimmick