I built a Coolify API tool to give my Open WebUI instance control over its own infrastructure. > [!NOTE] Get the Tool > You can install this tool directly from the Open WebUI registry: [CoolifyAPI Tool for Open WebUI](https://openwebui.com/t/whogben/coolify) [Coolify](https://coolify.io) is the free, open-source, self-hostable DevOps tool I use to manage my Open WebUI instances both in the cloud and locally. Updating Open WebUI usually requires logging into the Coolify dashboard and manually rebooting. I wanted to automate this, so I built a tool that allows the AI to manage itself. ## The Coolify API Tool This tool connects an Open WebUI agent to the Coolify API to explore, debug, and manage server infrastructure. It supports: * **System Exploration**: Listing servers, projects, applications, and services to understand the environment. * **Debugging**: Retrieving full application details and logs to diagnose issues. * **Lifecycle Management**: Starting, stopping, restarting, and updating services. ## Example Usage ### 1. Self-Update The most powerful demonstration is asking the AI to update itself. ![](../_images/Coolify%20OWUI%20Tool/owui_coolify_tool_demo.mp4) I simply tell the agent to update Open WebUI. The agent then takes over: 1. Calls `list_applications` and `list_services` to locate the Open WebUI instance. 2. Calls `restart_service(latest=true)` to pull the latest images and restart. The reboot interrupts the server mid-generation, causing a temporary 500 error. Once the container restarts, Open WebUI returns fully updated. ### 2. Understand the Server You can ask the agent to "Familiarize yourself with my Coolify instance and give me an overview of all systems." The agent uses these tools to orient itself: * `list_servers` * `list_projects` * `list_applications` * `list_services` ### 3. Debug a Problem If something isn't working, you can ask the agent to "Solve [problem] with [application]." It investigates using: * `get_application` / `get_service`: To check configurations. * `get_application_logs`: To read runtime errors. ### 4. Manage Lifecycle The agent can also control application states: * `start_application` / `stop_application` / `restart_application` * `deploy_application` (pulls latest image and restarts) * `start_service` / `stop_service` / `restart_service` *Note: Use at your own risk. Granting AI control over server infrastructure requires caution.*