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