Enabling AI Mode
AI features require a configured LLM provider and a valid API key. When you disable AI mode, the Workbench hides the AI analysis icon, Ask Ellie chat, alert analysis, and chart analysis; see Running Without AI for details. Follow these steps to enable AI mode:
- Choose a provider. The server supports
anthropic,openai,gemini, andollama. - Obtain an API key from your chosen provider, or install Ollama for a self-hosted local model. Ollama does not require an API key.
-
Store the API key in a file readable only by the server process. In the following example, the
echocommand writes the key andchmodrestricts access to the file owner:echo "your-api-key" > ~/.anthropic-api-key chmod 600 ~/.anthropic-api-key -
Update the
LLM CONFIGURATIONsection of the server configuration file (/etc/pgedge/ai-dba-server.yaml), adding your LLM provider details and specifying the path to your provider's API key:#========================================================================= # LLM CONFIGURATION (Web Client Chat Proxy) #========================================================================= # # The server proxies LLM requests for web clients and CLI tools that # don't have direct access to LLM APIs. API keys must be configured # for the chosen provider. # llm: # LLM provider: "anthropic", "openai", "gemini", or "ollama" # Default: anthropic # Default: claude-sonnet-4-5 model: "claude-sonnet-4-5" #----------------------------------------------------------------------- # Anthropic Configuration #----------------------------------------------------------------------- # Anthropic API key — provide the path to a file containing the # key via anthropic_api_key_file (raw keys cannot be set inline # for security). # anthropic_api_key_file: "~/.anthropic-api-key" -
Save the file and start the server; for example:
/opt/ai-workbench/ai-dba-server -config /etc/pgedge/ai-dba-server.yaml &