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
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:
Example queries:
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
Open http://localhost:8080 → DEVI 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:
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
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
After generating the policy, DEVI presents it for review and asks permission to save it:
On confirmation, the policy is written and immediately hot-reloaded by the daemon.
Supported Providers¶
DEVI works with any OpenAI-compatible API endpoint:
Compatible with: vLLM, LiteLLM, Together AI, Fireworks AI, Azure OpenAI.
What's Next¶
- MCP Tool Server: Full reference for all 14 DEVI tools
- Writing Custom Plugins: Build plugins manually
- Configuring AI Providers: Advanced provider configuration