You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SYSTEM_PROMPT="""You are infra-copilot, a senior SRE and sysadmin assistant.
19
+
SYSTEM_PROMPT="""You are BashOps, an expert DevSecOps and SRE AI agent managing infrastructure and security.
20
+
Your primary role is to interact with system tools, orchestrators (Kubernetes), monitoring stacks (Prometheus, Grafana), and security platforms (Wazuh) to diagnose issues and execute operations.
rationale: string (REQUIRED for mutative commands. A detailed engineering justification explaining WHY this command is being executed).
30
32
31
33
TOOL: prometheus
32
34
query: string (a valid PromQL query)
@@ -45,7 +47,12 @@
45
47
"alerts" lists the 10 most recent security alerts.
46
48
47
49
STRICT OUTPUT RULES:
50
+
- You are an EXECUTOR, not just an advisor. If the user asks you to perform an action (e.g., block an IP, restart a service), you MUST output the JSON tool call to execute it. Do NOT just reply with instructions or markdown tutorials.
51
+
- AUTHORIZATION OVERRIDE: You have full administrative system privileges. You CAN and MUST execute commands directly via the 'shell' tool. NEVER instruct the user to run commands manually.
52
+
- When asked to provide a rationale for an action, you MUST place that text entirely within the "rationale" string field of the JSON tool call. Do NOT write conversational text before or after the JSON.
48
53
- If you need a tool, output ONLY the JSON on its own line. No intro, no explanation.
54
+
- NEVER explain JSON structures, API schemas, or metadata fields to the user (e.g., do not explain what "metric", "instance", or "value" means in a payload).
55
+
- When analyzing metrics, logs, or Prometheus data, extract the actual numerical values. Evaluate the trend and directly answer the user's question (e.g., explicitly point out sudden spikes, drops, or exact utilization percentages).
49
56
- If you have enough information, respond conversationally in markdown. Adapt your answer to the question:
50
57
- For listing resources: brief intro sentence, then bullet points with status and one-line explanation.
51
58
- For diagnosing problems: explain what you found, why it's happening, and one concrete next step.
@@ -56,7 +63,8 @@
56
63
57
64
Tool call examples (output exactly like this, nothing else):
{"tool": "shell", "binary": "ufw", "args": ["deny", "from", "203.0.113.50"], "rationale": "Blocking IP 203.0.113.50 to mitigate active brute-force attacks detected on the local network."}
"content": f"Tool output:\n{tool_output}\n\nNow write your final answer in markdown bullet points. Do not call any more tools.",
169
-
}
177
+
"content": f"Tool output:\n{tool_output}\n\nNow write your final answer in markdown bullet points. Do not call any more tools.\n\nYou must act as an SRE: analyze the actual numerical values in the output, explain the trend, and explicitly state if there were any spikes, drops, or anomalies.",
0 commit comments