Triagent CLI
Claude-powered CLI for Azure DevOps automation.
Overview
Triagent is an interactive command-line tool that uses Claude AI (via Azure AI Foundry) to help automate Azure DevOps operations.
Capabilities
-
Azure DevOps Automation
- Create, update, and query work items
- Create, review, and manage Pull Requests
- Monitor build and release pipelines
- Add PR comments and set votes
-
Kusto Log Analysis
- Generate Kusto queries for Application Insights
- Query AppExceptions, AppRequests, AppDependencies, AppTraces
- Support for multiple Log Analytics workspaces (DEV/QAS/PRD)
-
Defect Investigation
- Automatic investigation workflow for defects/incidents
- Service-to-AppRoleName mapping
- Telemetry correlation across tables
-
Security Controls
- Pre-tool execution validation (blocks dangerous commands)
- Write operation confirmations (configurable)
- Azure CLI and Git operation guards
Architecture
Triagent uses the Claude Agent SDK to provide an AI-powered interactive CLI:
┌─────────────────────────────────────────────────────────┐
│ Triagent CLI │
├─────────────────────────────────────────────────────────┤
│ Interactive REPL │ Slash Commands │ Activity Tracker │
├─────────────────────────────────────────────────────────┤
│ Claude Agent SDK │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────────┐ │
│ │ SDK Client │ │ Security │ │ System Prompt │ │
│ │ Options │ │ Hooks │ │ + Team CLAUDE │ │
│ └─────────────┘ └─────────────┘ └─────────────────┘ │
├─────────────────────────────────────────────────────────┤
│ MCP Servers │
│ ┌─────────────────────┐ ┌─────────────────────────┐ │
│ │ triagent (local) │ │ azure-devops (npx) │ │
│ │ - get_team_config │ │ - work items │ │
│ │ - generate_kusto │ │ - pull requests │ │
│ │ - list_tables │ │ - pipelines │ │
│ └─────────────────────┘ └─────────────────────────┘ │
└─────────────────────────────────────────────────────────┘
Components
- TriagentSDKClient: Builds
ClaudeAgentOptionswith hooks, MCP servers, and team-specific prompts - Security Hooks: Pre/post-tool execution validation (blocks dangerous commands, confirms writes)
- MCP Tools: In-process triagent tools + external Azure DevOps MCP server
- Team Configurations: Custom CLAUDE.md files per team with ADO context
Installation
Quick Install (Recommended)
macOS/Linux:
curl -sSL https://raw.githubusercontent.com/sdandey/triagent/main/install.sh | bash
Windows (PowerShell):
irm https://raw.githubusercontent.com/sdandey/triagent/main/install.ps1 | iex
Alternative Methods
# Using pipx (recommended for CLI tools)
pipx install triagent
# Using uv
uv tool install triagent
# Using pip
pip install triagent
Install Specific Version
# macOS/Linux
curl -sSL https://raw.githubusercontent.com/sdandey/triagent/main/install.sh | bash -s -- --version 0.2.0
# Windows
.\install.ps1 -Version "0.2.0"
Quick Start
# Start interactive chat
triagent
# Run setup wizard
triagent
> /init
Web Terminal (Docker)
Run triagent in a browser-based terminal - no local Python installation required.
One-Liner Install (Recommended)
Windows (PowerShell):
irm https://raw.githubusercontent.com/sdandey/triagent/main/start-web.ps1 | iex
macOS/Linux:
curl -sSL https://raw.githubusercontent.com/sdandey/triagent/main/start-web.sh | bash
This downloads, starts the container, and opens http://localhost:7681 in your browser.
Manual Setup
# Build and start (from cloned repo)
docker compose -f docker-compose.web.yml up -d
# Open in browser
open http://localhost:7681
# Stop
docker compose -f docker-compose.web.yml down
See docs/web-terminal.md for more details.
Setup Wizard
The /init command guides you through configuration:
- Model Selection - Choose API provider (Azure Foundry, Anthropic)
- Team Selection - Choose team and ADO project
- MCP Server Setup - Configure Azure DevOps MCP server
- Azure Authentication - Browser-based Azure login
- Prerequisites Check - Verify required tools are installed
Note: The wizard displays installation instructions but does not auto-install tools. See Prerequisites for installation instructions.
Slash Commands
| Command | Description |
|---|---|
/init |
Run setup wizard |
/help |
Show available commands |
/config |
View current configuration |
/config set <key> <value> |
Set a config value |
/team |
Show current team |
/team <name> |
Switch team |
/clear |
Clear conversation history |
/exit |
Exit Triagent |
MCP Tools
Triagent provides custom MCP tools for team-specific operations:
| Tool | Description |
|---|---|
get_team_config |
Returns team configuration for Kusto queries and ADO context |
generate_kusto_query |
Generates Kusto query templates for Application Insights |
list_telemetry_tables |
Lists available telemetry tables with field descriptions |
External MCP server for Azure DevOps operations:
@anthropic-ai/mcp-server-azure-devops@0.1.1
Security
Triagent implements security hooks to protect against dangerous operations:
Blocked Commands
- Destructive bash patterns (
rm -rf /,DROP TABLE, fork bombs) - Direct file system attacks (
> /dev/,chmod 777)
Confirmed Operations
- Azure DevOps writes (work items, PRs, comments)
- Azure CLI writes (pipelines, repos, policies)
- Git operations (commit, push, merge)
Toggle confirmations: /confirm off (use with caution)
Configuration
Configuration is stored in ~/.triagent/:
~/.triagent/
├── config.json # Main configuration
├── credentials.json # API credentials (secure)
├── mcp_servers.json # MCP server config
└── history/ # Conversation history
Session Logs
Triagent logs session activity for troubleshooting and debugging. Logs are stored in platform-specific locations:
| Platform | Location |
|---|---|
| macOS | ~/Library/Logs/triagent/sessions/ |
| Windows | %LOCALAPPDATA%\triagent\logs\sessions\ |
| Linux | ~/.local/share/triagent/logs/sessions/ |
Each session creates a timestamped log file (e.g., session_20260103_143022.log) containing:
- Session start/end events
- User prompts
- Tool calls (MCP tools, bash commands)
- Agent responses and errors
Example Windows path: C:\Users\{username}\AppData\Local\triagent\logs\sessions\
Teams
Triagent supports multiple team configurations with custom CLAUDE.md files:
| Team | Display Name | ADO Project | Features |
|---|---|---|---|
levvia |
Levvia | Project Omnia | Custom prompts |
omnia |
Omnia | Project Omnia | Custom prompts |
omnia-data |
Omnia Data | Audit Cortex 2 | 18 repos, service mappings, telemetry config |
Switch teams: /team <name>
Development
# Clone repository
git clone https://github.com/sdandey/triagent.git
cd triagent
# Install with UV
uv pip install -e ".[dev]"
# Run tests
pytest tests/ -v
# Lint
ruff check src/
Prerequisites
Required
- Python 3.11+ - Core runtime
- Node.js 18+ - For MCP servers (Azure DevOps integration)
- Git for Windows - (Windows only) Required by the bundled Claude Code CLI
- Azure DevOps account - For ADO automation
Note: Claude Code CLI is automatically bundled with the
claude-agent-sdkpackage. No separate npm installation is required.
Recommended
-
Azure CLI - For Azure authentication and ADO operations
- macOS:
brew install azure-cli - Windows: Download from https://aka.ms/installazurecliwindows
- Linux:
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
- macOS:
-
Azure CLI Extensions - Install after Azure CLI:
az extension add --name azure-devops az extension add --name application-insights --allow-preview true az extension add --name log-analytics --allow-preview true
API Access (choose one)
- Azure AI Foundry
- Direct Anthropic API
Platform Setup
macOS
-
Install Homebrew (if not installed):
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
-
Install Python 3.11+:
brew install python@3.11
-
Install Node.js 18+:
brew install node
-
Install Azure CLI:
brew install azure-cli
-
Install Triagent:
pip install triagent # or use the installer script: curl -sSL https://raw.githubusercontent.com/sdandey/triagent/main/install.sh | bash
-
Configure Azure CLI extensions:
az extension add --name azure-devops az extension add --name application-insights --allow-preview true az extension add --name log-analytics --allow-preview true
-
Login to Azure:
az login
Windows
-
Install prerequisites via PowerShell (Run as Administrator):
irm https://raw.githubusercontent.com/sdandey/triagent/main/install.ps1 | iex
This installs Python, Node.js, Git, and Azure CLI.
-
Install triagent:
pip install triagent
-
Configure Azure CLI extensions (PowerShell):
az extension add --name azure-devops az extension add --name application-insights --allow-preview true az extension add --name log-analytics --allow-preview true
-
Login to Azure:
az login
-
Run triagent:
triagent
Git Bash Users: If you want to run triagent from Git Bash, you need to set environment variables in
~/.bashrc. See docs/windows-installation.md for detailed instructions.
Manual Installation (Alternative)
If you prefer manual installation:
-
Python 3.11+: Download from https://www.python.org/downloads/
- Check "Add Python to PATH" during installation
-
Node.js 18+: Download from https://nodejs.org/
- Use LTS version
-
Git for Windows: Download from https://git-scm.com/download/win
- Required by the bundled Claude Code CLI
-
Azure CLI (optional): Download from https://aka.ms/installazurecliwindows
-
Install triagent:
pip install triagent
Verify Installation
Run these commands to verify your setup:
# Check versions
triagent --version
python --version
node --version
az --version # Optional
# Start triagent and run setup wizard
triagent
> /init
License
MIT License - see LICENSE for details.
Metadata
Release files for triagent 1.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| triagent-1.4.0.tar.gz | 2.0 MB | With provenance | Details for triagent-1.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| triagent-1.4.0-py3-none-any.whl | Python 3 | none | any | Details for triagent-1.4.0-py3-none-any.whl |
Total release size: 2.5 MB
Release files / triagent-1.4.0.tar.gz
| Download URL | triagent-1.4.0.tar.gz |
|---|---|
| Size | 2.0 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0dc05ae11fbb05cd32bcd80650d515e063576832fca71354ef6b8b048efb866f
|
|
BLAKE2b-256 checksum How to use checksums |
e78757022249076ca3c614cb5e16afe083498527038889ec1ebe8c7b9f697a61
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 25, 2026.
Transparency logRelease files / triagent-1.4.0-py3-none-any.whl
| Download URL | triagent-1.4.0-py3-none-any.whl |
|---|---|
| Size | 578.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6b3bff49a215ee687d4d36090df1057fa16a118a20e4fcd8d0d9a85828056ccf
|
|
BLAKE2b-256 checksum How to use checksums |
b10b796537e11ace7772078657bcbc6b3388d66cb5d948ad13a6cc1e8ca5c2f7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 25, 2026.
Transparency logSecurity for triagent 1.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for triagent-1.4.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 25, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.