Skip to content

AI Remediation

Ask DEVI what is costing the most in us-east-1. It queries the live graph, ranks by cost, and stages remediations for your approval.


Prerequisites

  • CloudSlash installed and a scan completed
  • An AI provider configured (free local option: Ollama)

AI Provider

Configure an

Option A

Ollama (Free, Local, Private)

# Install Ollama from https://ollama.com
ollama pull llama3.2

# CloudSlash auto-detects it during init
cs init

No API key needed. All inference runs on your machine.

Option B

Cloud APIs

cs config

Select your provider and paste your API key:

Provider Key Format Best Model
OpenAI sk-... gpt-4o
Anthropic sk-ant-... claude-opus-4-5
Gemini AIza... gemini-2.5-pro
Groq gsk_... llama-3.1-70b

DEVI Questions

Ask in the TUI

Launch the dashboard and press / to open the AI prompt bar:

cs tui

Example queries:

Which resources cost the most in us-east-1?
What's the blast radius if I terminate the NAT gateway nat-0abc123?
Show me all idle EC2 instances that have been stopped for more than 30 days
Which security groups allow unrestricted inbound traffic?

DEVI queries the Universal Graph directly via its MCP tools. You get precise answers backed by live infrastructure data, not hallucinated guesses.

DEVI Dashboard

Use in the Web

cs daemon

Open http://localhost:8080DEVI AI tab. The web interface adds:

  • Tier indicators: shows whether your query was handled by the fast router model or escalated to the deep frontier model
  • Tool call visualization: see exactly which graph queries DEVI made to answer your question
  • Multi-turn conversation: DEVI remembers the last 20 messages for context

Two-Tier Architecture

Understanding the

DEVI uses a deterministic classifier (zero latency, no LLM call) to route queries:

Fast Router Model (cheap, handles ~80-90% of queries): - Simple lookups: "how many idle instances?" - Tag checks: "which resources are missing the env tag?" - Status queries: "what's the current waste count?"

Deep Frontier Model (escalates automatically for): - Blast radius analysis - Plugin generation - Migration planning - Security audit requests - Multi-step remediation planning - Queries containing analyze, generate, what if, topology

If the router model returns more than one tool call in a single response, DEVI automatically escalates to the deep model mid-turn.

DEVI Plugin

Generate a

DEVI can write Go source code for a new provider plugin from a natural language description.

In the DEVI chat:

Generate a CloudSlash plugin that scans DigitalOcean Droplets and Volumes for waste

DEVI will: 1. Generate complete Go source code implementing the Provider gRPC interface 2. Show you the code for review 3. Ask for confirmation before writing it to disk (write_file MCP tool) 4. Ask for confirmation before compiling (build_plugin MCP tool)

Agentic Actions Require Confirmation

Any MCP tool that writes files, compiles code, or modifies state always presents a confirmation prompt. DEVI will never take destructive action autonomously.

DEVI Remediation

Let DEVI Plan a

Analyze the 10 most expensive idle resources and give me a remediation plan with estimated savings

DEVI: 1. Calls query_graph to find the top idle resources by cost 2. Calls get_financial_ledger for current waste totals 3. Calls run_oracle_simulation for spot termination risk on relevant instances 4. Returns a prioritized remediation plan with savings estimates and risk assessment

You can then review the plan and approve individual items in the s.a.u Pipeline tab.

DEVI Policy

Save a Policy Generated

Write a CEL policy that blocks any resource over $1000/mo from being auto-remediated

After generating the policy, DEVI presents it for review and asks permission to save it:

I'll save this to ~/.cloudslash/policies/cost-guardrails/rules.yaml
[Confirm? Y/N]

On confirmation, the policy is written and immediately hot-reloaded by the daemon.


Supported Providers

DEVI works with any OpenAI-compatible API endpoint:

cs config set ai.base_url http://my-vllm-server:8000/v1
cs config set ai.model mistral-7b-instruct

Compatible with: vLLM, LiteLLM, Together AI, Fireworks AI, Azure OpenAI.


What's Next