AI Agent
OpsKat's AI Agent lets you manage infrastructure through natural-language conversations. Instead of navigating menus, describe what you need and the agent executes commands, queries, and file transfers on your behalf.
Provider Configuration
OpsKat supports multiple AI providers. You can configure and switch between them in Settings > AI, or use the setup wizard on first launch.
OpenAI-compatible API (Recommended)
Works with OpenAI, DeepSeek, Azure OpenAI, and any OpenAI-compatible endpoint (e.g., self-hosted models via vLLM, Ollama, etc.).
- API Endpoint — The base URL (e.g.,
https://api.openai.com/v1) - API Key — Your API key
- Model — Model name (e.g.,
gpt-4o,deepseek-chat). Click Fetch Models to auto-discover available models, or type manually — model parameters (max output tokens, context window) will auto-fill based on known presets.
The agent uses streaming SSE for real-time response delivery and OpenAI function calling for tool invocation.
Anthropic API
Native support for Anthropic's Messages API with prompt caching optimization.
- API Key — Your Anthropic API key
- Model — Claude model name (e.g.,
claude-sonnet-4-20250514)
Supports automatic context compression when conversations approach the context window limit.
How Conversations Work
Each conversation is a multi-turn dialogue between you and the AI agent. The flow:
- You send a message describing what you want to do.
- The AI decides which tools to call based on your request.
- Each tool call is executed, with results fed back to the AI.
- The AI processes the results and may call additional tools or respond.
- The runner continues the guarded tool loop until it produces a response, is cancelled, or reaches its configured execution limits.
Protocol helpers reuse the application's connection pools where applicable.
Available Tools
The tool registry includes asset and group management, SSH/file operations, batch execution, SQL and supported data-service operations, Kubernetes and Kafka operations, permission requests, and local workspace tools. Installed extensions are exposed through a single exec_tool dispatcher rather than one hard-coded AI tool per extension.
Tool availability is capability-specific: not every asset has an AI operation helper. In particular, the built-in RDP session and object-storage browser are currently interactive app surfaces rather than AI helpers. The registry evolves with the application, so the tool cards shown in a conversation are the authoritative list for the running version.
Policy Enforcement on AI Actions
Operations with a registered policy kind pass through the policy pipeline:
- Policy check — The command/query is evaluated against the asset's allow/deny rules and policy groups.
- Grant matching — If a grant session has been approved (via
request_permission), matching patterns are auto-approved. - User confirmation — If neither policy nor grant covers the action, you are prompted to allow or deny.
The AI agent can proactively call request_permission to submit command patterns for batch approval, reducing the number of individual confirmations.
See Policy Enforcement for details on configuring rules.
AI Coding Tool Integration
OpsKat integrates with AI coding CLIs like Claude Code, Codex, OpenCode, Pi, and Gemini CLI. Skill/plugin installation teaches these AI assistants how to use opsctl, enabling them to directly manage servers, run commands, transfer files, and query databases.
Installing Skills
- Open Settings and go to the AI tab.
- Under Universal Install, click Install. Most tools are covered by this one step.
- Install any tool listed under Separate Install that you use.
Universal install
The universal install writes the skill to ~/.agents/skills/opsctl/, the shared Agent Skills location. A single install is picked up by every tool that reads it:
Pi · Codex · OpenCode · Cursor · GitHub Copilot · Windsurf · Gemini CLI · Cline · Warp · Rovo Dev · Amp
The AI tab lists the current set, so check there if you are unsure whether your tool is covered.
Separate install
Claude Code reads ~/.claude/skills/ rather than the shared directory, so it is installed on its own — as a plugin under ~/.claude/plugins/, which also gives you two slash commands:
| Command | Description |
|---|---|
/opsctl | Full opsctl CLI reference — asset management, exec, ssh, cp, sql, redis, grant, session |
/opsctl:init | Server environment auto-discovery — scans a server via SSH and generates a structured description |
Skills are automatically updated when the desktop app is updated.
Once installed, these AI coding tools can use supported opsctl commands as part of their workflow. Commands retain the policy, approval, and audit behavior documented for their individual operation paths.