Overview
The Agent Control endpoints allow you to start, stop, approve actions, and retrieve the state of the Sentinel AI autonomous monitoring agent. The agent operates in cycles, monitoring services, diagnosing issues, and executing remediation actions.Agent Lifecycle
The agent can be in one of the following states:idle: Not currently runningrunning: Actively executing a monitoring cyclewaiting: Paused and waiting for human approvalerror: Encountered a critical error
Run Agent
POST /agent/run
Response
Operation status - will be “started”
Human-readable confirmation message
Error Responses
409 Conflict - Agent is already running:The agent runs as a background task. Use the Get Agent State endpoint to monitor progress.
Stop Agent
POST /agent/stop
Response
Operation status - will be “stopping”
Human-readable confirmation message
Error Responses
400 Bad Request - Agent is not running:Approve Agent Action
waiting, this endpoint allows you to approve or reject a proposed action. The agent will then resume execution based on your decision.
Endpoint: POST /agent/approve
Query Parameters
The approval decision. Must be either
"approve" or "reject"Response
Operation status - will be “resuming”
Confirmation message indicating whether the action was approved or rejected
Error Responses
400 Bad Request - Agent is not waiting for approval:This endpoint is only valid when the agent state is
waiting. Check the agent state before calling this endpoint.Get Agent State
GET /agent/state
Response
The response contains the full agent state object:Current agent status:
"idle", "running", "waiting", or "error"ISO 8601 timestamp of the last agent execution, or
null if never runThe current step in the agent’s execution flow (e.g.,
"monitor", "diagnose", "remediate")Whether a stop request has been issued
Array of log entries from the current execution
Description of the current error being handled, if any
Name of the service currently being analyzed or remediated
Number of retry attempts for the current operation
Log of diagnostic steps performed during the current cycle
Security-related flags or warnings identified during monitoring
Approval status:
"WAITING_APPROVAL", "APPROVED", or "REJECTED"Example Response
Memory Endpoint
GET /memory
Response
Returns an array of memory episodes. Each episode represents a complete monitoring and remediation cycle.The exact structure of memory episodes depends on the agent’s memory implementation.