
Building an Agentic AI Night Operator for My Remote Observatory
28 Aug 2026By Akshay Kumar
A clear, moonless night at the observatory yields about six usable hours of integration time. Losing half of that window because a sequencer continued exposing into thick haze
9 usable hours out of 12. The rest went to haze. is not an equipment failure, but a situational blind spot. I ran into the same issue on M81 and M82
The first night, scrapped over a camera angle., where an entire night of data was scrapped because the camera angle did not match the earlier sessions.
Both times, the hardware functioned normally. The sequencer simply did not know the plan was no longer useful because it had no awareness of its surroundings, so it continued executing the original instructions until morning. The goal of this night operator is to bridge that gap by supervising telemetry, respecting hard mathematical boundaries, and adapting the session dynamically overnight.
The Three Tiers of Observatory Operation
To understand where true autonomy begins, it helps to distinguish how remote observatories operate across three distinct tiers:
- Remote Operable: Extends physical reach over a network using tools like Tailscale, IoT power switches, and remote desktop. You eliminate physical travel to the pier, but you still sit at a monitor at 02:00 to inspect frames and manually click buttons.
- Automated: Executes pre-programmed, deterministic instruction trees through software like NINA and PHD2. The setup runs unattended until an unhandled edge case occurs, at which point it either halts safely or wastes dark sky by executing bad instructions into poor conditions.
- Agentic: Operates against high-level project intent under shifting constraints. Rather than executing a static queue, an agent evaluates live telemetry, checks project quotas, and dynamically adjusts the schedule to maximize seasonal progress.
| Capability | Level 1: Remote Operable | Level 2: AutomatedCURRENT STATE | Level 3: AgenticTARGET |
|---|---|---|---|
| Core Mechanism | Remote Desktop, Tailscale, IoT relays | NINA Advanced Sequencer, PHD2 | State-aware supervisor (Hermes) + Local LLM |
| Session Planning | Manual target selection per night | Manual sequence construction before sunset | Goal-driven seasonal backlog balancing |
| Weather Handling | Wake up, check radar, and click park | Hard threshold triggers (pause/abort) | Correlates telemetry, waits, or pivots to standby |
| Human Role | Active desk operator | Advance scheduler and morning triage | Sets seasonal goals and reviews logs |
- Core Mechanism
- Remote Desktop, Tailscale, IoT relays
- Session Planning
- Manual target selection per night
- Weather Handling
- Wake up, check radar, and click park
- Human Role
- Active desk operator
- Core Mechanism
- NINA Advanced Sequencer, PHD2
- Session Planning
- Manual sequence construction before sunset
- Weather Handling
- Hard threshold triggers (pause/abort)
- Human Role
- Advance scheduler and morning triage
- Core Mechanism
- State-aware supervisor (Hermes) + Local LLM
- Session Planning
- Goal-driven seasonal backlog balancing
- Weather Handling
- Correlates telemetry, waits, or pivots to standby
- Human Role
- Sets seasonal goals and reviews logs
My setup in Bhagalpur currently operates solidly at the Automated tier
First light, January 2026. The telescopes stay mounted on permanent piers with persistent polar alignment, routed cabling, and dedicated mini-PCs that boot on power restoration.

Reliable baseline systems already run on site: power sockets run through IoT switches, mini-PCs boot on power restoration, and Tailscale provides encrypted mesh networking. These deterministic foundational layers do not need an AI model.
The observatory still relies on an on-site caretaker to unlock and roll back the roof, though adding rain sensors and a motorized roof driver will eventually automate that physical link once the software supervisor is proven. The true bottleneck is not mechanical. It is the absence of context during execution.
Architecture: Deterministic Inner Loops, Probabilistic Outer Loops
When bringing AI into an automated setup, it is easy to fall into two common traps:
- Treating a Chatbot as True Autonomy: Setting up an AI to send alerts and answer questions is a convenient interface, but it is not automation. If an operator still has to sit at a screen typing prompts to diagnose an issue and keep the night moving, you have not built an autonomous system. You have simply replaced clicking a button with typing an expensive, token-burning message.
- Forcing AI into Tasks That Already Work: Wrapping routine actions (such as taking an exposure, slewing to coordinates, or rotating a filter wheel) inside an AI loop is poor engineering. It takes basic tasks that standard software executes with 100 percent reliability and makes them slow, costly, and vulnerable to random model errors.
Connecting NINA's API to a Model Context Protocol (MCP) server lets a language model turn "Point to the Moon and expose 5ms" into a slew command. That is a useful testing tool, but it remains a basic natural language interface, acting as little more than a conversational remote control.
Real operational autonomy requires a clean separation between two distinct layers:
- The Execution Plane (Inner Loop): Low-level hardware tasks like slewing, plate solving, autofocus routines, filter changes, exposure counts, and PHD2 guiding corrections belong entirely to NINA and PHD2. They run locally and reliably without any token overhead.
- The Supervisory Plane (Outer Loop): The operating environment is always changing, whether that means weather forecasts, sudden haze, seeing shifts, or multi-night project quotas. The supervisory agent operates only at this higher level, evaluating qualitative trade-offs, handling unexpected interruptions, and passing pre-validated sequence queues down to the execution engine.
The model only provides recommendations. Hermes checks those recommendations against fixed constraints before anything is passed to NINA, and Hermes itself is limited to the four actions shown above.
Alongside NINA and PHD2, an automated session recorder aggregates real-time target data, filter progress, guiding RMS, and environmental telemetry into structured records.
Hermes manages the overall session lifecycle. Built on the open-source agent framework from Nous Research, Hermes monitors workflow state, checks pre-authorized operational boundaries, and coordinates external alerts over Telegram.
- Continue
- Follow the pre-approved sequence without intervention, covering standard imaging runs.
- Ask
- Query the model for qualitative decisions, such as ranking standby targets during an unexpected clear window.
- Escalate
- Alert me directly if an issue falls outside pre-approved parameters and requires manual intervention.
- Dispatch
- Send an automated dispatch to on-site support in Bhagalpur when a physical action is required.
If a primary target finishes early, the language model might suggest switching to NGC 6888 to complete a missing filter set, even if the object has already set below the local horizon.
PROPOSAL resume NGC 6888, 1h Ha still needed to close
CHECK TARGET ALTITUDE LIMITS TIME LEFT VERDICT
NGC 6888 -13.0 n/a 48 min FAIL
RESULT Target is below the horizon; rejected before reaching sequencer.Because Hermes evaluates physical constraints before passing any plan to NINA, impossible suggestions are rejected instantly.
Supervised Desk Work via MCP: The Proving Ground
Before deploying Hermes as an unattended background daemon, the underlying toolchain is validated interactively through the Model Context Protocol (MCP). Exposing NINA's API through an MCP server lets a language model inspect system state and test complex multi-step routines during supervised desk work.
Point the C8 at the Moon and give me a run along the terminator. The 676 is already on it.
19:40nina.mount_slew(target=Moon)
nina.camera_mode(camera=ASI676MC readout=high-speed)
Slewing the CEM70 to the Moon, checking pointing, and switching the 676 to high frame rate. I will balance exposure using the histogram before starting the run.
19:40nina.capture_preview(exposure=5ms)
histogram peak at 62 percent, no clipping
nina.capture_video(frames=1000 exposure=5ms gain=121 roi=2048x2048)
Moon_2026-08-22_1940.ser, 4.2 GB
Run finished. 1000 frames captured at 5 ms (gain 121), saved as Moon_2026-08-22_1940.ser (4.2 GB) on the NAS. Frame quality stayed consistent throughout.
19:44Good. Cool the 2600 on the north pier to minus five. Also, how much new OIII do I have on IC 405 so far?
19:46nina.camera_cooler(pier=north setpoint=-5)
sessions.query(target=IC405 filter=OIII since=2026-08-01)
28 subs, 140 min, 3 nights
Cooler set. IC 405 has 28 new OIII subs across three pre-dawn sessions this month (2 hours 20 minutes), with framing matching the March baseline.
19:46Supervised testing session with Claude controlling the setup via MCP.
MCP translates conversational commands into structured JSON tool calls, letting the model query project databases and coordinate hardware commands while NINA handles execution. The raw video files and sub-exposures remain untouched on network storage until manual post-processing on the workstation. The stacked lunar terminator close-up in the gallery
The best twenty percent of the frames, stacked in AutoStakkert shows the result of a run like this.
This MCP setup is the engineering testbed: it validates that tool definitions, API serialization, and hardware feedback loops work flawlessly. But it is strictly a stepping stone. Hermes packages these proven tool integrations into an autonomous daemon that monitors telemetry across hours, evaluates contingencies, and runs the entire observing session without human presence.
Walkthrough: An Unattended Prototype Night
To show how telemetry logging, constraint checks, and the decision engine operate together in a production scenario, here is the chronological breakdown of an automated observing session planned for the upcoming winter season.
The project queue holds two primary targets: NGC 7000, which needs a final 3h20m of Hα before setting in the west, and IC 405
34.5 hours on the Auriga complex, March 2026, which requires several hours of OIII data once the 32% Moon sets at 21:51. High clouds are forecast after 02:00.

Multi-filter projects like the Auriga complex
The OIII master channel, 140 frames of 300s require filter tracking across months of variable weather, where automated scheduling prevents wasted acquisition time.
The inputs for the schedule are fully deterministic: ephemeris tables provide altitude and moonset timings, the forecast provides cloud trends, and the local session database tracks remaining filter requirements. The operator synthesizes these variables into an organized plan.
The Target Selection Dashboard on this site already performs the mathematical side of this calculation. It computes visibility windows, checks horizon limits, and ranks reachable targets. The night operator automates the final step: executing and supervising that plan within verified boundaries.

- Session timeline from 16:30 to 06:45.
- 18:20 to 21:55: NGC 7000 Ha, Ha imaging.
- 22:00 to 01:40: IC 405 OIII, OIII imaging.
- 01:40 to 02:30: IC 405 BONUS, OIII imaging.
- 02:30 to 03:25: CLOUD HOLD, weather hold.
- 03:25 to 04:05: M42 CORE, standby run.
- 16:55: SUNSET.
- 18:12: ROOF OPEN.
- 21:51: MOONSET.
- 04:05: PARK.
- 06:30: REPORT.
The full prototype night at a glance, from plan formulation to the morning report.
16:45: Automated Plan Formulation
Hermes initiates ten minutes before sunset, querying ephemeris data, filter requirements, and forecasts. It discards targets that violate horizon limits and formats an initial schedule for Telegram review.
ephem.night(site=observatory)
sunset 16:55, moonset 21:51, moon 32 percent
sessions.progress(targets=NGC7000,IC405)
Ha 2h30m of 5h50m, OIII 2h20m of 6h
weather.forecast(window=tonight)
clear, high cloud possible after 02:00
Tonight looks usable through most of the evening, with high clouds expected after 02:00. The moon is at 32 percent and sets at 21:51. NGC 7000 has 2h30m of Ha collected and needs 3h20m more. It transits near sunset and loses altitude through the evening, and Ha is resilient to early moonlight. IC 405 has 2h20m of its planned 6h OIII sequence completed and will be well placed after moonset. Proposed plan: Start with NGC 7000 in Ha, then switch to IC 405 in OIII after moonset. Shall I initialize the rig at 17:45 and request the roof?
16:4516:48: Defining Operational Boundaries
I approve the schedule, specify a plate-solve rotation check on IC 405 to guarantee framing alignment with March data, and set an approved standby list in case weather interrupts the primary plan.
Approved. Confirm the IC 405 sensor rotation matches March before starting that sequence. If the plan is interrupted, choose from the standby list; otherwise park the mount.
16:48Understood. I will verify the IC 405 angle against the March reference framing before starting OIII exposures. Standby list confirmed: M42 in LRGB (30s for core detail), M45 in LRGB, and NGC 2244 in Ha. I will only select among these if the main targets become unusable. Otherwise the session will end in park.
16:48
Checking the plate-solve rotation angle against previous session logs prevents multi-night integration errors. Setting the standby list in advance gives the agent clear, bounded options if conditions change overnight.
17:45: Pre-Flight Hardware Initialization
Hermes runs the startup routine. NINA connects to hardware, cools the camera sensors, homes the filter wheel, and verifies available storage.
Camera connected and cooling towards −10 C. Mount connected. Filter wheel homed, Ha in position. PHD2 running, guide camera connected. Disk space: 1.4 TB available. Sequence loaded: NGC 7000 Ha → IC 405 OIII.
17:53Camera stable at −10.0 C. Readiness checks passed. Requesting roof opening.
18:0118:05: Physical Ground Dispatch in Bhagalpur
Because the roll-off roof is manually operated, the automated schedule still interfaces with a physical human on site. The operator sends the opening request directly to the caretaker over Telegram in Hindi.
टेलिस्कोप तैयार है। छत खोल दीजिए और खुल जाए तो मैसेज कर दीजिए।
18:05खोल दिया
18:12धन्यवाद।
18:12Dispatch to local caretaker to unlock and roll back the observatory roof.
With the roof confirmed open, Hermes updates the session log and starts the sequence on plan.
nina.start_sequence(queue=NGC7000-Ha)
started, slewing to NGC 7000
Roof confirmed open by the caretaker at 18:12. Starting the approved sequence with NGC 7000 in Ha.
18:13nina.slew_center(target=NGC7000)
solved and centered, offset 6 arcsec
nina.autofocus(filter=Ha)
settled, HFR 2.24
phd2.guide_stats(window=5m)
RMS 0.55 arcsec, stable
First 300s Ha frame is in and looks clean. Autofocus and guiding are stable. Next message only if something needs attention.
18:2618:20 to 02:30: Routine Imaging
NINA manages active exposures, plate solving, autofocus routines, meridian flips, and PHD2 autoguiding.

- Exposure
- 300s
- HFR
- 2.28
- Stars
- 412
- Guiding
- 0.52 arcsec
- Cooler
- −10.0 C
- Ambient
- 12.4 C
- Dew point
- 10.8 C
- Next
- Filter change 21:55
Telemetry snapshot during standard acquisition with NINA running the active sequence.
During standard data acquisition, the supervisor remains quiet, recording telemetry and monitoring equipment health without adding computational overhead to the imaging sequence.
02:30: Weather Interruption and Assessment
At 02:30, high clouds cause the Half-Flux Radius (HFR) to spike while guide-star SNR drops sharply, prompting NINA to pause the active sequence.
phd2.guide_stats(window=15m)
guide-star SNR falling, RMS 1.4 arcsec
weather.forecast(window=now)
high cloud band overhead, clearing after 03:00
Image quality has degraded over recent frames and guide-star SNR has dropped. Hardware status is normal, matching the forecast of passing high clouds. NINA has paused the sequence based on HFR limits. No intervention needed. I will monitor conditions and reassess if the sky clears.
02:30Hermes matches the HFR pause against weather telemetry, verifies that the hardware is functioning normally, and waits for conditions to clear rather than generating false alarms.
03:05: Contingency Rescheduling in a Narrow Window
IC 405 reached its six-hour integration target at 01:40, so the frames captured before the cloud pause were bonus depth beyond the goal. By 03:05, forecasts show a remaining 45-minute clear window before dawn. Hermes filters the pre-approved standby list against altitude and horizon limits.
WINDOW 03:20 to 04:05, approx 45 min usable
CHECK TARGET ALTITUDE LIMITS VERDICT
M42 53.8 ok PASS
M45 47.6 ok PASS
NGC 2244 69.0 ok PASS
RESULT All 3 targets clear physical constraints; querying model for project priority.With all three standby targets physically reachable, Hermes evaluates their project utility:
- M42: High altitude; 30-second exposures will complete the unclipped Trapezium core data needed for the existing deep integration
15 hours on M42, with a saturated core in longer subs. - M45: Reachable, but gains little value from a 45-minute broadband run under changing transparency.
- NGC 2244: Reachable, but too short an interval to add meaningful narrowband depth.
timer.start(duration=20m label=override-window)
armed, expires 03:25
The primary plan is complete. IC 405 hit its 6h OIII target before the cloud arrived, and there is a 45-minute window remaining before dawn. Among the approved standby targets, M42 is the most productive choice: a short 30s LRGB run will capture the missing unclipped Trapezium core. The other standby targets require longer runs to be useful. Unless you override this within 20 minutes, I will start M42 once transparency recovers. Checking again at 03:15 and executing at 03:25.
03:05timer.check(label=override-window)
10m remaining, no reply received
Standby plan active; loading M42 sequence at 03:25 unless overridden.
03:15timer.expired(label=override-window)
20m elapsed, no override received
nina.load_sequence(target=M42 preset=trapezium-30s)
Loading approved M42 sequence into NINA. Imaging will start as soon as HFR conditions clear.
03:25Hermes selects the appropriate sequence, loads it into NINA, and resumes imaging automatically.
04:05: Morning Park and Dispatch
When the standby window closes, Hermes parks the mount, warms the sensors, and sends the morning roof closure message to the caretaker.
nina.park_and_warm(pier=north)
parked, cooler off
M42 window complete with 68 usable 30s frames. Mount parked, sensor warming, session archived. Roof closure queued with the morning dispatch.
04:08scheduler.wake(at=06:30 job=morning-report)
watchdog.report(window=16:45 to 06:30)
heartbeat continuous, no gaps
Morning summary: NGC 7000 Ha sequence finished (40 subs at 300s). IC 405 OIII sequence reached its 6h target. M42 added 68 core subs. Roof confirmed closed at 05:58. Watchdog heartbeat logged continuously for 13h 45m with no errors. Thumbnails and logs are saved in the session directory.
06:30The morning report confirms that all acquisition targets, hardware resets, and watchdog checks completed without requiring manual intervention.
Expanding from Prototypes to Seasonal Portfolios
Selecting between standby targets across a single evening is an effective prototype, but true autonomy means moving from nightly fallback logic to seasonal portfolio management.
In amateur astrophotography, the core challenge is not picking an object for an isolated hour; it is balancing multi-night projects across a four-month winter season. A complete portfolio might include a faint broadband reflection nebula, a widefield four-panel narrowband mosaic, and an opportunistic comet pass.
This is where the supervisory layer demonstrates its value:
- Intent-Based Scheduling: Instead of building a fixed sequence by hand each afternoon, you define seasonal goals (e.g., "Finish the 40-hour Auriga mosaic and bank 25 hours on M81 IFN by March"). The agent evaluates moon phase, seeing forecasts, and current integration depths to decide which project to load on any given night.
- Dynamic Seeing Allocation: The supervisor monitors real-time sub-exposure quality. If sky transparency or seeing degrades, it dynamically shifts from delicate broadband targets to high-signal narrowband sequences, or safely parks the mount to conserve hardware life.
- Deterministic Guiding Diagnostics vs. High-Level Safety: Guiding loop corrections in PHD2 remain strictly deterministic math. However, the supervisory agent monitors tracking trends. If persistent wind gusts or mechanical slip push guiding RMS beyond an acceptable threshold for three consecutive frames, the supervisor decides whether to re-calibrate, switch to a shorter focal length rig on Pier 2, or safe the telescope.
- Targets of Opportunity: For fast-moving events like bright transiting comets or newly alerted novae, the supervisor can cross-reference orbital ephemeris, verify horizon clearance, and automatically allocate an unpredicted observing window before dawn without manual reconfiguration.
Implementation Roadmap: From Scripts to Seasonal Autonomy
Developing this architecture follows a phased engineering progression, ensuring deterministic reliability at each level before adding autonomous complexity:
- Phase 01RUNNING
Deterministic Baseline
- Permanent pier alignment, Tailscale mesh VPN, IoT power management.
- Deterministic NINA Advanced Sequencer execution and native PHD2 guiding.
- Manual on-site roof dispatch via Telegram.
- Phase 02CURRENT FOCUS
Tooling and Telemetry Plumbing
- NINA API wrapped inside a Model Context Protocol (MCP) server for desk-supervised tool execution.
- Automated session recorder capturing sub-exposure telemetry, FWHM/HFR trends, and filter counts.
- Pre-flight hardware initialization checks (sensor cooling, filter homing, storage audits).
- Phase 03NEXT STEP
Bounded Nightly Prototypes
- Hermes daemon running in background across isolated 1-2 night prototype runs.
- Hard constraint engine evaluating horizon math before model invocation.
- Automated overnight contingency handling (weather pause evaluation and pre-approved standby target selection).
- Unattended morning park routines and structured Telegram watchdog reports.
- Phase 04TARGET STATE
Seasonal Intent and Goal Engine
- Transitioning from nightly fallback lists to seasonal portfolio balancing (40h narrowband mosaic plus 25h broadband IFN).
- Autonomous moon-phase and seeing-quality allocation across competing project quotas.
- Targets of opportunity interception (fast-moving transiting comets via orbital ephemeris).
- Local offline inference on the on-site RTX PRO 5000 workstation.
- Motorized roof interlocks and on-site rain sensors to remove manual dispatch.
The jump from Phase 2 (MCP Tooling) to Phase 3 (Nightly Prototypes) proves the mechanics: can an agent observe live state, respect horizon math, and make a safe decision without crashing the telescope?
The real destination, however, is Phase 4 (Seasonal Intent). Once bounded decisions work reliably over an isolated night, we remove the concept of manually building nightly queues altogether. The human operator defines the high-level seasonal portfolio; the supervisor manages the nightly trade-offs to bring that portfolio across the finish line by spring.
Failure Modes and Observability
Operating an unattended observatory requires accounting for failures in both hardware communication and automated reasoning:
- Stale or Corrupted Telemetry: If the session recorder misreads a stalled sequence as active, downstream decisions will fail. Accurate timestamps and independent hardware watchdog heartbeats are essential for validating system state.
- Valid but Inefficient Decisions: An agent can strictly adhere to constraints while selecting a low-priority target. Logging decision transcripts makes it straightforward to refine ranking prompts over time.
- Outdated Standby Lists: Fallback queues must be maintained to reflect current seasonal targets, preventing the system from using clear sky on completed projects.
- Silent Process Hangs: An unresponsive script looks identical to a quiet, normal session. The morning report must confirm continuous watchdog pings rather than assuming success from the absence of error logs.
To keep debugging straightforward, raw equipment telemetry is logged separately from agent reasoning transcripts. NINA and PHD2 record physical hardware performance, while Hermes logs the contextual decisions and prompt interactions that triggered each action.
The core architectural balance remains consistent: keep deterministic control within NINA and PHD2, enforce hard mathematical boundaries, and use the supervisory model only when conditions require an adaptive decision.
