AI SRE Copilot
The 7Server AI SRE Copilot is an agentic troubleshooting assistant designed specifically for Linux server operations and application deployment lifecycles.
Rather than giving generic boilerplate answers, the Copilot inspects the actual state of your server over SSH before answering, providing precise root-cause analysis and executable remediations.


How Copilot Agent Mode Works
When you ask a question like "Why is my API returning 502 errors?" or trigger a failure recovery action, the Copilot performs an autonomous diagnostic loop:
flowchart TD
A[User Request or Deploy Failure Trigger] --> B[1. Copilot Formulates Diagnostic Plan]
B --> C[2. Autonomous Read-Only Inspection over SSH]
C --> D{Check Status & Logs}
D -->|docker ps / logs / ss / journalctl| E[3. Analyze Root Cause]
E --> F[4. Propose Actionable Remediation]
F --> G{Requires State Change?}
G -->|Yes| H[User Confirmation Gate: Approve & Run / Skip]
G -->|No| I[Report Findings & Analysis]
H -->|Approved| J[Execute Remediation Command over SSH]
H -->|Skipped| K[Abort Remediation]Deployment Integration
7Server embeds the AI SRE Copilot directly into the application deployment pipeline:
1. Pre-Flight Architecture Review (✨ AI Pre-Flight Review)
Located directly in the Git Deployment modal:
- Before triggering builds or starting processes, click ✨ AI Pre-Flight Review.
- 7Server dispatches your deployment blueprint—including detected frameworks, build scripts, port assignments, and monorepo package configurations—to Copilot.
- Copilot validates your setup, warns of potential port clashes or missing environment variables, and recommends best-practice startup configurations.
2. Autonomous Deployment Failure Recovery (✨ Fix with AI Copilot)
When an application deployment or monorepo stack service fails (for example, exit code 1 during container startup or health check failure):
- Context-Aware Event Bridge: 7Server displays an alert banner in the deployment terminal and dispatches a
7server-copilot-askevent to the Copilot Drawer. - Automated Payload Transfer: The event automatically injects:
- Target server and application name
- Failed deployment pipeline stage
- Repository URL, branch, and configured internal port
- The trailing 35 lines of terminal stderr and container logs
- Autonomous Investigation: Copilot immediately inspects the server:
- Queries
docker ps --filter "name=<app>"to verify container health. - Inspects
docker logs --tail 50 <app>to capture runtime stack traces. - Runs
ss -tulpnto detect listening ports and binding conflicts.
- Queries
- Interactive Fix Proposal: Copilot outlines the failure cause and renders a formatted command card with an Approve & Run button, allowing you to apply the fix with a single click.
Built-in DevOps Engineer Skill & Custom Skills (SKILL.md)
7Server's AI SRE Copilot ships with a rich library of operational skills and lets you extend it with your own playbooks:
1. Built-in devops-engineer Baseline & Domain Playbooks
- DevOps Engineer Baseline (
devops-engineer): Enabled by default. Uses the Build / Deploy / Ops Hats methodology and a 7-step operational loop (Observe → Correlate → Root Cause → Minimal Fix → Verify → Harden) across systemd, Docker, Nginx, TLS, and Linux kernel diagnostics. - Context-Triggered SRE Skills: Automatically injects specialized playbooks based on your active dashboard tab or question—covering Web Apps & PM2, Docker & Compose, Nginx & Reverse Proxy, SSL & Certbot, Firewall & SSH Hardening, Databases (Postgres/MySQL/Redis/Mongo), Performance Triage, and Disk Cleanup.
2. Custom Skills (SKILL.md) in Agent Settings
Open Copilot Drawer → Agent Settings (⚙️) → Custom Skills (SKILL.md) to add your own domain playbooks or import skills from community repositories (such as skills.sh or claude-skills):
- Paste Raw
SKILL.md: Paste any markdown file with YAML frontmatter (name,triggers)—7Server automatically parses the frontmatter and registers the playbook. - Keyword Triggers or Always Active: Specify comma-separated trigger keywords (e.g.
k8s, kubectl, helm, pod) so the skill only loads when relevant, or leave triggers empty so the skill is always active.
Context Compaction (/compact) & Slash Commands
Long troubleshooting sessions with large SSH log outputs can quickly fill a model's context window. 7Server includes dual-layer Context Compaction:
- Interactive
/compactCommand & Pill Button: Type/compactin the chat input (or click the Compact pill button once a conversation has 6+ messages) to condense older messages and terminal outputs into a single expandable Context Compacted summary card while keeping the latest turns intact. - Automatic Backend Compaction: Before forwarding conversation history to the upstream AI provider, 7Server automatically compacts older
UNTRUSTED_OUTPUTterminal blocks and summarizes older turns when history exceeds the token budget. - Built-in Slash Commands: Type
/in the Copilot input to access quick operational playbooks:/compact— Compact older messages & SSH outputs to save context tokens/diagnose— Full server health triage (CPU, RAM, disk, load, failed units)/docker— Inspect containers, restart loops, and resource usage/logs— Analyze recent systemd & application error logs/nginx— Audit Nginx configs, upstream 502/504 errors, and active vhosts/ssl— Check TLS certificates and Certbot renewal timers/ports— List all listening TCP/UDP sockets and owning processes/disk— Find largest directories, Docker volumes, and log growth/security— Audit SSH logins, firewall rules, and open ports
Safety Rails & Injection Hardening
- Strict Read-Only Allowlist: Commands like
systemctl status,docker ps,docker stats,docker logs,ss,netstat,df,free, andjournalctlrun automatically without interrupting you. - Untrusted Data Fencing: Remote server outputs (terminal logs, command stderr) are strictly quarantined from AI prompt instructions using sentinel delimiters to prevent prompt-injection attacks from untrusted log entries.
- Explicit Approval Gates: Any command that modifies system state—such as stopping/recreating containers, modifying Nginx configurations, altering firewall rules, or editing
.envfiles—requires an explicit user confirmation click. - Step Budget Limit: Copilot operates within a hard limit of 8 autonomous diagnostic steps per query to guarantee predictable execution and prevent runaway agent loops.