← All lessons/Administration
58
Administration

DBA Agent

The external Resident DBA Agent: connect it to SapixDB, understand what it monitors, read daily health reports, and configure auto-remediation.

Prerequisite: Lesson 57 complete

What you'll learn

  • DBA Agent runs on Railway, provisioned via hire.boboyka.com — not part of sapix-agent
  • SapixDB connector: chain head tracking, strand integrity, organism health, Mutant review
  • Reads Sherapd and Alabay strands for alert escalation
  • Subscription tiers: Free (15m / weekly report), Pro (5m / daily), Enterprise (1m / real-time)
  • Connect with api_key scopes: strand:read, query:*, admin:agents
  • Daily report: per-agent record count, chain status, capacity %, pending Mutants
  • Auto-remediation (Pro+): cage restart, peer sync, failed cron retry, NL cache clear
  • vs. Sherapd/Alabay: DBA Agent acts on findings; watchdogs only record them
Challenge

Connect the DBA Agent to your SapixDB instance with a read-only key. Trigger a capacity check by calling GET /v1/capacity/forecast manually. Confirm the DBA Agent would surface the same data in its next health report.

## DBA Agent — Resident Database Administrator

The DBA Agent is an external autonomous Resident Agent that connects to your SapixDB instance and acts as a 24/7 database administrator. It monitors health, detects anomalies, auto-remediates within defined scope, and delivers daily plain-English health reports.

The DBA Agent runs as a persistent service on Railway and is provisioned through hire.boboyka.com — it is not part of sapix-agent itself.

---

## What it does for SapixDB

The DBA Agent has a native SapixDB connector with first-class support:

CheckFrequencyWhat it does
Chain head trackingEvery cycleDetects stalled chains (no writes when expected)
Strand integrityDailyCalls GET /v1/strand/verify on each agent
Organism healthEvery cycleCage state, record growth per agent
Mutant reviewOn new proposalsFlags pending Mutant proposals for approval
Sherapd alertsEvery cycleReads Sherapd strand for alert/critical findings
Alabay alertsEvery cycleReads Alabay strand for security findings
Capacity forecastHourlyCalls GET /v1/capacity/forecast, warns on urgency
API key expiryDailyWarns before scoped keys expire

---

## Subscription tiers

TierCheck intervalReportAuto-remediation
Free15 minutesWeekly summaryNone
Pro5 minutesDaily emailRetry failed crons, trigger peer sync
Enterprise1 minuteReal-time alertsCustom runbook actions

---

## Connect your SapixDB instance

From hire.boboyka.com, add a SapixDB connection:

{
  "type": "sapixdb",
  "url": "https://your-sapixdb.railway.app",
  "api_key": "spx_key_...",
  "label": "production"
}

The API key needs scopes: strand:read, query:*, admin:agents.

---

## Daily health report example

` SapixDB Daily Report — 2026-08-06 ────────────────────────────────── Agent: orders Records: 1,204,391 Chain: intact Agent: invoices Records: 401,823 Chain: intact Agent: sherapd Alerts today: 0 Agent: alabay Alerts today: 0

Capacity: 0.12% of 1 billion record limit (safe) Pending Mutants: 1 (proposal_xj9 awaiting approval)

Recommendation: Approve or reject proposal_xj9 before the next schema validation cycle (tomorrow 06:00 UTC). `

---

## Auto-remediation (Pro+)

The DBA Agent can auto-remediate routine issues without operator intervention:

  • Restart a caged agent caged by a script error (not by operator intent)
  • Trigger POST /v1/mesh/sync/:peer_id when a replication peer falls behind
  • Re-run a failed cron job once within its retry window
  • Clear a stale NL cache entry returning incorrect query plans

All remediation actions are written as records on the DBA Agent's own strand — fully auditable.

---

## DBA Agent vs. built-in watchdogs

Sherapd / AlabayDBA Agent
LocationInside sapix-agentExternal service
Findings storageSapixDB strandDBA strand + email
Human-readable reportsNoYes (daily email)
Auto-remediationNoYes (Pro+)
Multi-instance supportOne instanceMultiple SapixDB instances

---

See also: Lesson 57 (Sherapd & Alabay), Lesson 52 (Replication Reliability), hire.boboyka.com.

← Previous
Lesson 57: Sherapd & Alabay Watchdogs