Home lab
This agent checks the containers on your home server every 15 minutes. When one is down, it reads the logs and posts the cause. It proposes a fix as a tool call, which you approve in Slack.
Requires uv, a daemon user with access to the Docker socket, and a Slack app.
The files
Section titled “The files”mcp: docker: command: uvx args: [mcp-server-docker]
channels: slack: type: slack token: ${SLACK_BOT_TOKEN} signing_secret: ${SLACK_SIGNING_SECRET} members: {U024BE7LH: user:admin}
notify: targets: homelab: {channel: slack, room: "#homelab"}allow: - docker/list_* - docker/fetch_container_logsask: docker/stop_container: This stops a service. docker/start_container: This starts a service. docker/recreate_container: This recreates a container from its image.deny: docker/remove_*: Nothing is deleted. docker/run_container: New containers are started by you. docker/build_image: Images are built by you.budget: {usd: 0.50, per: day}---description: Keeps my home lab's containers running.tools: [docker/*]policy: homelabnotify: {to: [homelab], on: [parked, failed]}triggers: - name: check every: 15m prompt: Check every container.---List the containers. If one has exited, keeps restarting, or is unhealthy, read its last 100 loglines and say in two sentences what went wrong. Then propose the smallest fix: restart it, orrecreate it from its image. If everything is fine, answer "All good."Try it
Section titled “Try it”systemctl --user restart wardrik # reads config.yaml and policies/docker stop jellyfinwardrik ask homelab "Check every container."#homelab shows the findings and a start_container call for jellyfin, with Approve and
Deny. After editing only an agent file, wardrik reload is enough.
What it shows
Section titled “What it shows”notifysends only pending calls and failures, so healthy checks post nothing.- Docker access is root on the machine, so every change needs approval and destructive calls are denied.
- Logs are content from outside, so no log line can make a call run without approval.
- A turn interrupted by a power loss resumes when the daemon starts. See Durable runs.