Skip to main content

Sentinel

Sentinel gives operators visibility into what cloud agents are doing — runs in flight, their status, and the changes they produce — so automated work stays reviewable and accountable.

Sentinel is most valuable once you have automations running regularly or multiple team members starting cloud runs. It complements per-run views in the Agents workspace with an organization-wide operational picture.

What you can see

ViewDetails
Active runsStatus, duration, repository, and trigger source
Recent historyCompleted, failed, and cancelled runs in a selectable window
Changes producedDiffs, commits, and linked pull requests per run
Spend signalsUsage reservations reconciled against your allowance
Audit trailWho started a run, which automation fired, webhook deliveries

Time windows

Trends and summaries can be filtered by window:

WindowBest for
1 dayIncident response — "what ran in the last 24 hours?"
7 daysWeekly automation review
30 daysCapacity planning and budget forecasting

Run statuses

StatusMeaningOperator action
queuedWaiting for an available workerNormal under load; investigate if stuck > 10 min
runningAgent is actively workingMonitor; cancel if scope looks wrong
completedFinished successfullyReview diff / PR
failedError during setup or executionCheck logs; verify setup commands and network
cancelledStopped by user or policyConfirm intentional

Reviewing activity

Use Sentinel to spot runs that need attention — failures, long-running jobs, or unexpected changes — and to confirm automations are behaving as intended.

  1. Scan active runs

    Look for runs exceeding expected duration or targeting unexpected repositories. Compare against your automation inventory.

  2. Drill into failures

    Open failed runs and check whether the failure is environmental (setup, network, secrets) or task-related (agent couldn't complete the instruction).

  3. Review automation output

    For each enabled automation, confirm recent runs match intent — no duplicate PRs, no no-op runs consuming budget, no changes outside the scoped repository.

  4. Correlate spend

    Cross-reference run volume with Usage. Spikes often trace to a newly enabled automation or a trigger firing more often than expected.

Operations summary API

Platform operators and integrations can fetch a 24-hour operations summary from the agents API:

curl "https://agents-api.4rged.ai/api/operations/summary?organizationId=org_abc123" \
  -H "Authorization: Bearer <session-access-token>"

Example response shape:

{
  "organizationId": "org_abc123",
  "generatedAt": "2026-06-16T12:00:00.000Z",
  "window": { "hours": 24 },
  "runs": { "total": 14, "byStatus": { "completed": 10, "failed": 2, "running": 2 } },
  "jobs": { "total": 14, "byStatus": { "completed": 12, "pending": 2 } },
  "environments": { "total": 3, "byStatus": { "active": 2, "suspended": 1 } },
  "webhooks": { "total": 28, "byStatus": { "processed": 26, "failed": 2 } },
  "usage": { "reservations": 14, "estimatedUsd": 4.82 },
  "audit": { "events": 37 }
}

Use this endpoint for dashboards, paging hooks, or weekly operator reports.

Data sources behind the summary

The GET /api/operations/summary handler queries six Supabase tables for the requesting organization over a rolling 24-hour window: x4rge_agent_runs, x4rge_agent_jobs, x4rge_agent_environments, x4rge_github_webhook_deliveries, x4rge_usage_reservations, and x4rge_agent_audit_events. Spend in the response sums reconciled_usd (falling back to estimated_usd) from reservations created in that window. Job rows include lease metadata for worker debugging when runs appear stuck in queued.

Operator procedures

Daily check (5 minutes)

  1. Open Sentinel and filter to the last 24 hours.
  2. Confirm zero runs stuck in queued or running beyond SLA.
  3. Review any failed runs — categorize as env vs. task failure.
  4. Note webhook delivery failures; retry or fix GitHub app permissions.

Weekly automation review

  1. List all enabled automations and their last run time.
  2. Disable automations that haven't produced useful output in 14 days.
  3. Compare run count week-over-week; investigate > 2× spikes.
  4. Confirm budget headroom remains above 20% of monthly allowance.

Incident: runaway automation

  1. Disable the automation

    Set status to disabled immediately to stop new runs from firing.

  2. Cancel active runs

    Cancel in-flight runs targeting the affected repository from the Agents workspace.

  3. Review audit events

    Identify the trigger source (schedule drift, webhook loop, duplicate events).

  4. Fix and re-enable

    Tighten prompt scope or trigger filters, run once manually, then re-enable.

Note

Sentinel is most useful once you have automations running regularly. Pair it with budgets to keep automated spend in check.