Luciano Marchese ← All projects

AI agent operations / Self-hosted platform · In daily operation

Keeping AI agents useful, and the server alive.

I run a self-hosted AI agent gateway with five agents on Discord and Telegram. This case is about operations: limits, monitoring, backups, updates and what each incident changed.

Private system. Public walkthrough only.

How it works ↓
Diagram of the agent platform: channels, five agents on a self-hosted gateway, the guards around it and three incidents with the fix each one brought

Illustrative diagram of the platform and the guards around it.

01 The problem

AI agents are useful when they can read mail, files and calendars and run tasks on their own. On a shared server that also brings risk: an agent can delete credentials, a restart loop can freeze the machine and an update can leave no way back. I needed them running every day without watching every step.

02 My contribution

I install, configure and operate OpenClaw, an AI agent gateway, on my Linux server, and I am the one who responds when it fails. I designed the agents and their limits, the watchdog, the backup with restore rehearsals and the update procedure, and wrote a runbook or incident report for each failure. I work with Claude Code and Codex as assistants and review what they change.

Built with

  • OpenClaw
  • Linux
  • systemd
  • cgroups
  • SQLite
  • Discord

Architecture

  1. Discord, Telegram and a web interface
  2. OpenClaw gateway with five agents
  3. systemd services with memory, CPU and disk limits
  4. Watchdog every 2 minutes, one alert channel
  5. Daily verified snapshot, three copies

03 How it works

  1. Agents with a clear job

    A main assistant for mail, calendar, files and finance; a workshop for web builds; an operations agent for checks; a personal one; and one for another person. In October 2026 I began merging agents into skills of the main assistant to use less memory.

  2. Limits

    The gateway and the user session have caps on memory, CPU, disk access and processes. No agent can take the whole server.

  3. Watchdog

    An external check probes the gateway every 2 minutes and restarts it if it froze, at most once an hour, and reports to a single alert channel.

  4. Backups

    A daily verified snapshot, with three copies on three disks and a rehearsed restore in an isolated folder.

  5. Updates

    Each update starts with a risk review on a pinned release channel and ends with an audit. When a version brings memory problems, it is frozen and new agents wait.

04 Decisions and limits

  • Containment comes from the file system, not from instructions: each agent writes in its own workspace, and handoffs between agents are picked up, never pushed.
  • Destructive changes need confirmation. In July 2026 a cleanup deleted every login; it was restored from its own backup after about four and a half hours of downtime.
  • One restart authority: in August 2026 two watchdogs fed a restart loop that starved the server. One was removed and hard limits were added.
  • A copy is not a backup: after an update in September 2026 left no way back, daily verified snapshots with history replaced the plain mirror.

05 Evidence and validation

Each incident has a written report with a timeline, the cause and the change made. The limits were verified to survive reboots, backups are checked every night and the restore was rehearsed. I do not show hosts, addresses or the agents’ data.

06 The result

The agents work every day on mail, calendar, reminders, monitoring and web builds. What I show here is how I keep them running and what each failure taught me, not a product I built.

Private system. Public walkthrough only.

Talk about a similar project