Skip to content

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.

Access the AI Assistant from the sidebar → AI Chat. You can interact with it using natural language:

Check the disk usage on all production servers
Generate a script to clean up Docker images older than 30 days
Why is the CPU usage high on web-server-03?

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”

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.

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”

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

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.

Configure the AI model backend in System SettingsAI Configuration:

SettingDescription
ProviderOpenAI, Azure OpenAI, Ollama, etc.
ModelModel identifier (e.g., gpt-4o, llama3)
API KeyProvider-specific API key
TemperatureResponse creativity (0.0–1.0)
Max TokensMaximum response length

See the AI Configuration guide for detailed setup instructions.

All AI-generated scripts go through:

  1. User Review — Scripts are displayed in the editor for review before execution
  2. Dangerous Command Detection — Automatic scanning for destructive commands
  3. Approval Workflow — High-risk operations can require administrator approval
  4. Audit Trail — All AI interactions and generated scripts are logged

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.

ToolDescription
listHostsList all hosts with hostname, IP, OS, status, CPU/memory/disk usage
listHostsByStatusFilter hosts by status: 0=offline, 1=online, 2=unstable
getHostTagsView tags assigned to a specific host
addTagToHostAdd a tag to a host (auto-creates the tag if it doesn’t exist)
removeTagFromHostRemove a tag from a host
ToolDescription
executeScriptExecute a shell script on specified hosts. Scripts undergo risk assessment: low-risk executes automatically, medium/high-risk requires human approval, banned commands are rejected
listScriptsList all scripts in the script library
getScriptDetailGet detailed information about a script, including full content
createScriptCreate a new script and save it to the library
ToolDescription
listRecentTasksList recent tasks
getTaskDetailGet task details including per-host execution results and output
createTaskCreate and dispatch a script execution task to specified hosts
ToolDescription
listClustersList all clusters
getClusterDetailGet detailed information about a specific cluster
ToolDescription
getDashboardStatsGet platform overview statistics: total hosts, online/offline count, average CPU/memory usage
getHostMetricsGet historical monitoring metrics for a specific host
ToolDescription
listScheduledTasksList all scheduled inspection tasks
getInspectReportsGet recent inspection reports
triggerScheduledTaskManually trigger a scheduled inspection task to execute immediately
ToolDescription
approveTaskApprove a pending task for execution
rejectTaskReject a pending task
ToolDescription
detectSoftwareDetect software and services running on a specific host
queryAuditLogsQuery operation audit logs with optional action filter
ToolDescription
deepAnalysisLaunch a dedicated analysis model for deep thinking on performance bottlenecks, root cause analysis, architecture optimization, etc.
scriptSafetyReviewReview a shell script for security and correctness
delegateTaskDelegate a task to a sub-agent for execution
getTaskResultQuery the result of an async sub-task