AI Assistant
EasyShell’s AI Operations Assistant provides a natural language interface for common server management tasks. Powered by Spring AI, it can analyze logs, generate scripts, answer questions about your infrastructure, perform automated inspections, and supports DAG workflow orchestration and the AI Script Workbench.
Getting Started
Section titled “Getting Started”Access the AI Assistant from the sidebar → AI Chat. You can interact with it using natural language:
Check the disk usage on all production serversGenerate a script to clean up Docker images older than 30 daysWhy is the CPU usage high on web-server-03?Capabilities
Section titled “Capabilities”Infrastructure Queries
Section titled “Infrastructure Queries”Ask questions about your managed hosts:
- “Which servers have less than 10% disk space remaining?”
- “Show me the memory usage trend for the database cluster”
- “List all hosts running Ubuntu 22.04”
Script Generation
Section titled “Script Generation”Describe what you need, and the AI generates a ready-to-use script:
- “Write a script to rotate Nginx access logs older than 7 days”
- “Create a health check script for PostgreSQL replication”
- “Generate a script to update all npm packages and restart the app”
Generated scripts are reviewed in the built-in editor before execution.
Log Analysis
Section titled “Log Analysis”Paste or reference error logs for intelligent analysis:
- “Explain this error:
ERROR 1045 (28000): Access denied for user 'root'@'localhost'” - “Analyze the last 100 lines of /var/log/syslog on web-server-01”
AI Script Workbench
Section titled “AI Script Workbench”The AI Script Workbench provides a full-page AI-assisted script authoring environment:
- Describe your needs in natural language, and the AI generates executable scripts
- Built-in CodeMirror editor with syntax highlighting
- Script safety review and risk assessment
- Save directly to the script library or execute on target hosts
Automated Inspections
Section titled “Automated Inspections”Schedule AI-powered inspections that check for:
- Security vulnerabilities
- Performance bottlenecks
- Configuration drift
- Resource utilization anomalies
Inspection results are compiled into reports accessible from the Inspections page.
Configuration
Section titled “Configuration”Configure the AI model backend in System Settings → AI Configuration:
| Setting | Description |
|---|---|
| Provider | OpenAI, Azure OpenAI, Ollama, etc. |
| Model | Model identifier (e.g., gpt-4o, llama3) |
| API Key | Provider-specific API key |
| Temperature | Response creativity (0.0–1.0) |
| Max Tokens | Maximum response length |
See the AI Configuration guide for detailed setup instructions.
Safety
Section titled “Safety”All AI-generated scripts go through:
- User Review — Scripts are displayed in the editor for review before execution
- Dangerous Command Detection — Automatic scanning for destructive commands
- Approval Workflow — High-risk operations can require administrator approval
- Audit Trail — All AI interactions and generated scripts are logged
Available AI Tools
Section titled “Available AI Tools”The AI assistant has access to 26 specialized tools that enable it to interact with your infrastructure directly. These tools are automatically invoked based on your natural language requests. Tools support DAG (directed acyclic graph) workflow orchestration, enabling chained multi-tool execution.
Host Management
Section titled “Host Management”| Tool | Description |
|---|---|
listHosts | List all hosts with hostname, IP, OS, status, CPU/memory/disk usage |
listHostsByStatus | Filter hosts by status: 0=offline, 1=online, 2=unstable |
getHostTags | View tags assigned to a specific host |
addTagToHost | Add a tag to a host (auto-creates the tag if it doesn’t exist) |
removeTagFromHost | Remove a tag from a host |
Script Execution
Section titled “Script Execution”| Tool | Description |
|---|---|
executeScript | Execute a shell script on specified hosts. Scripts undergo risk assessment: low-risk executes automatically, medium/high-risk requires human approval, banned commands are rejected |
listScripts | List all scripts in the script library |
getScriptDetail | Get detailed information about a script, including full content |
createScript | Create a new script and save it to the library |
Task Management
Section titled “Task Management”| Tool | Description |
|---|---|
listRecentTasks | List recent tasks |
getTaskDetail | Get task details including per-host execution results and output |
createTask | Create and dispatch a script execution task to specified hosts |
Cluster Management
Section titled “Cluster Management”| Tool | Description |
|---|---|
listClusters | List all clusters |
getClusterDetail | Get detailed information about a specific cluster |
Monitoring
Section titled “Monitoring”| Tool | Description |
|---|---|
getDashboardStats | Get platform overview statistics: total hosts, online/offline count, average CPU/memory usage |
getHostMetrics | Get historical monitoring metrics for a specific host |
Scheduled Inspections
Section titled “Scheduled Inspections”| Tool | Description |
|---|---|
listScheduledTasks | List all scheduled inspection tasks |
getInspectReports | Get recent inspection reports |
triggerScheduledTask | Manually trigger a scheduled inspection task to execute immediately |
Approval Workflow
Section titled “Approval Workflow”| Tool | Description |
|---|---|
approveTask | Approve a pending task for execution |
rejectTask | Reject a pending task |
Software & Audit
Section titled “Software & Audit”| Tool | Description |
|---|---|
detectSoftware | Detect software and services running on a specific host |
queryAuditLogs | Query operation audit logs with optional action filter |
Advanced AI
Section titled “Advanced AI”| Tool | Description |
|---|---|
deepAnalysis | Launch a dedicated analysis model for deep thinking on performance bottlenecks, root cause analysis, architecture optimization, etc. |
scriptSafetyReview | Review a shell script for security and correctness |
delegateTask | Delegate a task to a sub-agent for execution |
getTaskResult | Query the result of an async sub-task |