# DevOps Agent - Argonaut

Argonaut is an **LLM-powered CLI and conversational AI tool** that automatically diagnoses, recommends, and helps fix issues with **ArgoCD applications** — directly within a Slack channel or command line interface or Google chat.

It acts as an intelligent assistant that listens to alerts and user queries, recommends the exact commands needed to debug or resolve an ArgoCD issue, executes them (automatically or on demand), analyzes the output, and continues the diagnostic loop — all within a single Slack thread/ Google chat thread, maintaining full context throughout the conversation. Argonaut bridges the gap between **ArgoCD alerts firing** and **engineers knowing exactly what to do next** — replacing guesswork with AI-guided, executable recommendations.

## Why Use Argonaut in OpsMx?

ArgoCD is the backbone of GitOps-based continuous delivery for Kubernetes applications. However, when ArgoCD applications fail — sync errors, OutOfSync states, health degradations, missing resources — engineers must manually investigate across multiple tools (kubectl, argocd CLI, git, Prometheus, Elasticsearch) to diagnose and fix the issue.

Argonaut solves this by:

* **Eliminating manual triage** — no more guessing which ArgoCD or kubectl command to run
* **Closing the loop between alerts and action** — Prometheus, ArgoCD, and Elasticsearch can post directly into Slack; Argonaut picks up those alerts and immediately recommends corrective commands
* **Keeping context across the conversation** — the entire diagnostic session lives in a Slack thread, so every recommendation is informed by what came before
* **Enabling LLM-guided GitOps fixes** — Argonaut can suggest changes to files in Git, create a PR, and merge it via shortcuts — all from Slack
* **Supporting both manual and automated remediation** — teams can run with human approval or enable AUTO-RUN once confident

## Scope for the Users

**1. Instant, Actionable Diagnostics**

Engineers no longer need to know every ArgoCD or kubectl command by heart. Argonaut recommends the exact command — including complex compound commands using `&&` and `|` — to diagnose and fix the issue immediately.

**2. Reduced Mean Time to Resolution (MTTR)**

The continuous loop of recommend → execute → analyze → recommend shortens the time from "alert fired" to "issue resolved," reducing the manual investigation cycle that typically spans multiple tools and terminal sessions.

**3. Context-Aware Assistance**

Because the entire session lives in a Slack thread, every subsequent recommendation is informed by the full conversation history — Argonaut doesn't ask you to repeat yourself or lose track of what has already been tried.

**4. Works Where Engineers Already Are**

No new portal to log into. Argonaut operates directly in **Slack** — where alerts already arrive and where engineering teams already collaborate — making adoption frictionless.

**5. GitOps Fix Automation**

With `GIT-FIX`, `GIT-PR`, and `GIT-MERGE`, engineers can make configuration corrections, raise a PR, and merge it — all from within the same Slack thread — without switching to a code editor or GitHub UI.

**6. Flexible Automation Level**

Teams can start with full human approval (manual `RUN`) and graduate to **AUTO-RUN** as confidence in Argonaut's recommendations grows — giving organizations control over how much autonomy they grant the tool.

**7. Full Alert-to-Fix Traceability**

With ArgoCD, Prometheus, and Elasticsearch all posting into Slack, Argonaut creates a single, traceable thread from **alert fired → diagnosis → commands run → fix applied** — a built-in audit trail for every incident.

## How It Works — The Argonaut Flow

```
Alert / User Query → Slack Channel
        ↓
Argonaut analyzes query (NAUT prefix on all responses)
        ↓
Recommends a command (simple or compound: &&, |)
        ↓
User types RUN  →  [or AUTO-RUN if enabled]
        ↓
Command executes via built-in CLI tools
        ↓
Output returned to Slack thread (TOOL prefix)
        ↓
Argonaut analyzes output → recommends next command or resolves issue
        ↓
Loop continues until resolved
```

**Key conversation rules:**

* All Argonaut responses begin with **`NAUT`** — to clearly identify AI responses
* All tool execution outputs begin with **`TOOL`**
* Argonaut **never responds** to messages starting with `NAUT` — preventing infinite response loops
* Users can bypass Argonaut and talk to each other by prefixing messages with `NAUT`
* Users can run their own commands via: `RUN argocd <your command>`

***

## Integrations

**Built-in CLI Tools**

Argonaut has native access to the following executables out of the box:

| Tool      | Purpose                                         |
| --------- | ----------------------------------------------- |
| `argocd`  | ArgoCD application management and diagnostics   |
| `kubectl` | Kubernetes resource inspection and management   |
| `git`     | Repository operations                           |
| `gh`      | GitHub CLI for PR creation and management       |
| `yq`      | YAML processing and editing                     |
| `jq`      | JSON parsing and filtering                      |
| `bash`    | Standard shell commands and compound operations |

#### **User Interface**

* **Slack** — primary interface for all interactions, alert ingestion, command recommendations, and output display
* **Email** — notification delivery

#### **LLM Interface**

* **OpenAI GPT-4o** and **GPT-4.1** via OpenAI APIs — powers all command recommendation and output analysis

**Conversation Database**

* **File-based** — lightweight, local conversation history
* **Elasticsearch** — scalable conversation storage for larger deployments

**Alert Sources (Slack-integrated)**

* **ArgoCD** — application sync and health alerts
* **Prometheus** — infrastructure and application metric alerts
* **Elasticsearch** — log-based alerts

#### Key Features & Commands

| Feature / Keyword | Description                                                                                                                                                               |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **AUTO-RUN**      | Automatically executes Argonaut's recommended commands without requiring the user to type `RUN` — ideal once the team has gained confidence in Argonaut's recommendations |
| **RUN**           | Manual trigger to execute the command recommended by Argonaut in the Slack thread                                                                                         |
| **GIT-FIX**       | Shortcut to make changes to files in a Git repository                                                                                                                     |
| **GIT-PR**        | Shortcut to create a pull request from the current changes                                                                                                                |
| **GIT-MERGE**     | Shortcut to merge an open pull request                                                                                                                                    |
| **SUMMARIZE**     | Summarizes the entire diagnostic conversation in the current Slack thread                                                                                                 |
| **HELP**          | Lists all available keywords, shortcuts, and concepts                                                                                                                     |

## Limitations

* Configuration and performance of **ArgoCD itself** — server setup, ArgoCD controller tuning, infrastructure-level concerns cannot be solved by Argonaut.&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.opsmx.com/remediation-agents/devops-agent-argonaut.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
