What is Doctor?

The plain-language introduction to Doctor: what it is, the problem it solves, and who it is for. Written for people who run the Apiary, not people who build it.

What is Doctor?

The plain-language introduction to Doctor: what it is, the problem it solves, and who it is for. Written for people who run the Apiary, not people who build it.

Related:


#The problem: a daemon that dies quietly

Your agents' memory runs on local daemons. A daemon that quietly dies at 2am costs you the next morning: a session that forgot everything, and twenty minutes re-explaining a codebase your agent knew yesterday. And every self-monitoring scheme hits the same wall, who restarts the restarter, because the monitor shares a failure with the thing it monitors.

#The idea: a watchdog the OS keeps alive

Doctor is the watchdog for the Apiary stack. Your operating system supervises Doctor, and Doctor supervises everything else. Because it stands outside the things it watches, it never depends on them to stay alive. It is deliberately tiny and boring: no third-party dependencies, built from your platform's own building blocks, and designed to be harder to kill than anything it watches.

#What it does for you

  • Watches. Every 30 seconds it checks each daemon's health, and it learns not just that something is wrong but what kind of wrong: down, wedged, or degraded in a specific part.
  • Heals. When a daemon is sick it climbs a repair ladder: restart it, and if restarts keep failing, reinstall it, remove a conflicting package if one is detected, back off between tries, and stop the instant health returns. A daemon you kill on purpose is usually back within one check.
  • Stays quiet when fine. A healthy check is a single log line. It does not nag, notify, or update anything on a good day.
  • Speaks up plainly. When the ladder runs out, it writes a plain-language report of what it found, every step it tried, and what it recommends, and shows it on a local status page first.
  • Updates safely. It auto-updates the memory daemon only behind an approved-release gate, verifies health afterward, and rolls back a bad release. It never updates its own package on its own.
  • Never touches your credentials. There is no code in it that can read or delete your credentials file. If it suspects a credential problem, it tells you and stops.

#How it feels

Most days you never notice Doctor. It works quietly. The one time you do notice is the morning something would have gone wrong and did not, because Doctor already fixed it and left a note.

#Who it is for

  • Anyone running the Apiary stack whose agents' memory depends on local daemons.
  • The person who installs it and lives with it.

#Where it fits

Doctor keeps the local pieces alive. Honeycomb, Nectar, and Hive do the work; Doctor makes sure they keep running and feeds one live health signal that the Hive portal renders.

#Next steps