Beacon

The Beacon system provides auto-discovery and heartbeat monitoring for AI agents, giving enterprises real-time visibility into their agent fleet.

How It Works

text
┌─────────────┐ ┌──────────────────┐ ┌─────────────┐ │ Agent │──────▶ │ Sekuire Backend │ ◀──────│ Dashboard │ │ │ heartbeat│ │ query │ │ │ beacon loop │──────▶ │ stores status │──────▶ │ shows fleet│ └─────────────┘ └──────────────────┘ └─────────────┘
  1. Agent starts and registers with the Sekuire backend
  2. Beacon loop sends periodic heartbeats (default: every 60 seconds)
  3. Backend tracks liveness, status, and metadata
  4. Dashboard shows real-time fleet status
  5. If heartbeats stop, the agent is marked as unhealthy

Heartbeat Lifecycle

PhaseActionBackend Response
RegistrationAgent sends initial heartbeat with metadataReturns lease duration and config
RunningPeriodic heartbeats with status updatesConfirms lease renewal
Lease expiryAgent misses heartbeat windowMarks agent as unhealthy
RevocationKill switch triggeredReturns revocation signal on next heartbeat
ShutdownAgent sends final shutdown signalMarks agent as stopped

Platform Detection

Beacon automatically detects the runtime platform and includes this in heartbeat metadata:

PlatformDetection MethodMetadata Reported
Docker/.dockerenv file presenceContainer ID, image name
KubernetesKUBERNETES_SERVICE_HOST envPod name, namespace, node
AWS LambdaAWS_LAMBDA_FUNCTION_NAME envFunction name, region
Bare MetalDefault fallbackHostname, OS, PID

Heartbeat Payload

POST /api/v1/installations/:id/heartbeatjson
{ "status": "healthy", "uptime_seconds": 3600, "platform": { "type": "kubernetes", "pod_name": "my-agent-7f8a9b-xyz", "namespace": "production", "node": "node-pool-1-abc" }, "metrics": { "requests_handled": 1500, "errors": 2, "avg_latency_ms": 145 } }

Kill Switch Integration

The Beacon heartbeat response includes a revoked field. When the kill switch is triggered:

Heartbeat response (revoked)json
{ "lease_renewed": false, "revoked": true, "reason": "Emergency shutdown initiated by admin", "shutdown_timeout_ms": 5000 }

The agent SDK checks this field and initiates graceful shutdown.

ℹ️See Kill Switch for details on revocation.

CLI Usage

Run with beacon enabled (default)bash
sekuire run --cmd "npm start"
Custom heartbeat intervalbash
sekuire run --heartbeat-interval 30
Disable beacon (not recommended)bash
sekuire run --no-heartbeat

Next Steps