DBA Agent
The external Resident DBA Agent: connect it to SapixDB, understand what it monitors, read daily health reports, and configure auto-remediation.
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
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:
| Check | Frequency | What it does |
|---|---|---|
| Chain head tracking | Every cycle | Detects stalled chains (no writes when expected) |
| Strand integrity | Daily | Calls GET /v1/strand/verify on each agent |
| Organism health | Every cycle | Cage state, record growth per agent |
| Mutant review | On new proposals | Flags pending Mutant proposals for approval |
| Sherapd alerts | Every cycle | Reads Sherapd strand for alert/critical findings |
| Alabay alerts | Every cycle | Reads Alabay strand for security findings |
| Capacity forecast | Hourly | Calls GET /v1/capacity/forecast, warns on urgency |
| API key expiry | Daily | Warns before scoped keys expire |
---
## Subscription tiers
| Tier | Check interval | Report | Auto-remediation |
|---|---|---|---|
| Free | 15 minutes | Weekly summary | None |
| Pro | 5 minutes | Daily email | Retry failed crons, trigger peer sync |
| Enterprise | 1 minute | Real-time alerts | Custom 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_idwhen 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 / Alabay | DBA Agent | |
|---|---|---|
| Location | Inside sapix-agent | External service |
| Findings storage | SapixDB strand | DBA strand + email |
| Human-readable reports | No | Yes (daily email) |
| Auto-remediation | No | Yes (Pro+) |
| Multi-instance support | One instance | Multiple SapixDB instances |
---
See also: Lesson 57 (Sherapd & Alabay), Lesson 52 (Replication Reliability), hire.boboyka.com.