Deploy Agent
The ephemeral agent that orchestrates deployments — managing approval quorum, cross-channel voting, and environment-specific safety policies.
Deploy Agent
The Deploy Agent manages the approval and execution flow for deployments. It enforces quorum-based approval, supports cross-channel voting (approve from Slack, WhatsApp, or any connected channel), blocks self-approval, and applies strict safety policies — especially for production.
Characteristics
| Property | Value |
|---|---|
| Lifecycle | Ephemeral — spawned per deploy request, terminates on completion |
| Spawned by | Project Agent, on deploy command |
| Color | Alert Amber (#F59E0B) |
Approval Flow
Every deployment goes through an approval flow. The required number of approvals (quorum) depends on the target environment:
Quorum Requirements
| Environment | Required Approvals | Auto-Execute Possible? |
|---|---|---|
| Staging | 1 | Yes, at L5 only |
| Production | 2 | Never — always requires human approval |
Flow Diagram
Token-Based Approval System
Each deploy request generates a unique approval token. This token is used to track votes and prevent duplicates:
Token Lifecycle
- Created when a deploy is requested
- Pending while waiting for approvals
- Approved when quorum is reached
- Rejected if any approver explicitly rejects
- Expired after 1 hour with insufficient approvals
Cross-Channel Voting
Because CodeSpar is channel-agnostic, approvals can come from any connected channel. A deploy requested in Slack can be approved from WhatsApp:
The response is broadcast back to the channel where the deploy was originally requested.
Self-Approval Blocking
The person who requests a deploy cannot approve their own request. This enforces the four-eyes principle:
Auto-Execution Policy
The Deploy Agent respects the project's autonomy level but with strict constraints:
Auto-Execution Matrix
| Autonomy Level | Staging | Production |
|---|---|---|
| L0–L4 | Requires approval | Requires approval |
| L5 | Auto-executes | Requires approval (always) |
Production deploys are the most critical safety guardrail in CodeSpar. They always require human approval, regardless of autonomy level.
Example Interactions
Staging Deploy (L5 — Auto-Execute)
Production Deploy (Full Flow)
Rejected Deploy
Health Checks
After a deploy completes, the Deploy Agent runs health checks against the target environment:
If the health check fails, the Deploy Agent reports the failure and — depending on configuration — can trigger a rollback.
Environment Variables
The Deploy Agent itself doesn't require specific environment variables beyond those needed by the Project Agent and GitHub integration. Deploy targets and health check URLs are configured per project: