AI Configuration
EasyShell integrates AI capabilities through Spring AI, supporting multiple model providers for the chat assistant, scheduled inspections, and SOP automation.
Model Provider Configuration
Section titled “Model Provider Configuration”spring: ai: openai: api-key: ${OPENAI_API_KEY} chat: options: model: gpt-4o temperature: 0.3 max-tokens: 4096spring: ai: azure: openai: api-key: ${AZURE_OPENAI_KEY} endpoint: https://your-resource.openai.azure.com chat: options: deployment-name: gpt-4o temperature: 0.3spring: ai: openai: api-key: ${DEEPSEEK_API_KEY} base-url: https://api.deepseek.com chat: options: model: deepseek-chat temperature: 0.3spring: ai: openai: api-key: ${GITHUB_COPILOT_TOKEN} base-url: https://api.githubcopilot.com chat: options: model: gpt-4o temperature: 0.3spring: ai: openai: api-key: ${API_KEY} base-url: http://localhost:11434/v1 chat: options: model: llama3.1 temperature: 0.3AI Features Toggle
Section titled “AI Features Toggle”easyshell: ai: enabled: true chat: enabled: true system-prompt: | You are EasyShell AI Assistant, an expert in Linux system administration, shell scripting, and DevOps. Help users manage their servers effectively. Always prioritize safety — warn about destructive commands. inspection: enabled: true schedule: "0 0 2 * * ?" # Daily at 2:00 AM auto-approve: false # Require manual approval for remediation sop: enabled: trueVector Store
Section titled “Vector Store”EasyShell uses a file-based vector store (SimpleVectorStore from Spring AI) for AI memory and SOP context retrieval.
easyshell: ai: vector-store: path: /data/easyshell/vectors dimensions: 1536 # Must match embedding model embedding: model: text-embedding-3-smallThe vector store powers:
- AI Memory — Retaining context from previous conversations
- SOP Matching — Finding relevant SOPs based on the current situation
- Script Recommendations — Suggesting scripts based on the problem description
Scheduled Inspections
Section titled “Scheduled Inspections”Inspections automatically check host health and generate reports.
easyshell: ai: inspection: enabled: true schedule: "0 0 2 * * ?" # Cron expression targets: ALL # ALL | cluster:production | tag:critical checks: - disk-usage - memory-usage - cpu-load - zombie-processes - failed-services - security-updates - log-anomalies thresholds: disk-usage-warning: 80 # percent disk-usage-critical: 95 memory-usage-warning: 85 cpu-load-warning: 80Operation Approval
Section titled “Operation Approval”For safety, destructive operations detected by AI can require manual approval.
easyshell: ai: approval: enabled: true auto-approve-safe: true # Auto-approve read-only operations require-approval: - service-restart - package-install - file-modification - user-management notification: channels: - email - webhookEnvironment Variables
Section titled “Environment Variables”All AI configuration can be set via environment variables:
| Variable | Description |
|---|---|
OPENAI_API_KEY | OpenAI API key |
AZURE_OPENAI_KEY | Azure OpenAI API key |
EASYSHELL_AI_ENABLED | Enable/disable AI features |
EASYSHELL_AI_CHAT_ENABLED | Enable/disable chat assistant |
EASYSHELL_AI_INSPECTION_ENABLED | Enable/disable scheduled inspections |
EASYSHELL_AI_INSPECTION_SCHEDULE | Inspection cron schedule |