Skip to main content

Deployment Lifecycle

Every deployment in CleverThis moves through a defined set of states. Understanding these states helps you diagnose issues and know what actions are available at each point.

State diagram

┌─────────┐
deploy ────► │ pending │
└────┬────┘
│ ready
┌────▼─────┐
◄── stop ── │ running │ ◄──── restart
└────┬─────┘
│ stop
┌─────▼──────┐
│ stopping │
└─────┬──────┘
│ drained
┌────▼─────┐
│ stopped │
└──────────┘

(any state) ──► failed

State descriptions

pending

The deployment has been requested and CleverThis is provisioning it: loading the Actor definition, validating configuration, and registering the endpoint in the routing table.

  • Typical duration — under 5 seconds for provider models and simple Actors; up to 30 seconds for complex multi-agent Actors
  • During pending — no requests are routed; calls to this model ID return 503 Service Unavailable
  • If stuck in pending — wait 60 seconds, then check the deployment detail view for an error message. If none appears, contact support.

running

The deployment is live and accepting requests. This is the steady state for a healthy deployment.

  • The endpoint appears in GET /v1/models responses for keys scoped to its namespace
  • Usage statistics accumulate in the billing system
  • Configuration (rate limits, cost cap, system prompt) can be changed without leaving this state — changes propagate within seconds

stopping

A stop has been requested. CleverThis is draining in-flight requests before fully removing the endpoint from the routing table.

  • New requests — receive 503 Service Unavailable during draining
  • In-flight requests — are allowed to complete (up to the model's timeout)
  • Typical duration — under 10 seconds; can be longer if there are long-running streaming requests in flight

stopped

The deployment is inactive. The endpoint no longer appears in /v1/models and new requests to that model ID return 404 Not Found.

  • The deployment record is retained — it appears in the Deployments list with greyed styling
  • You can restart a stopped deployment at any time from the three-dot menu or the deployment detail view
  • No usage is accrued while stopped

failed

CleverThis encountered an error. This can happen:

  • During pending — the Actor YAML was invalid after a late-stage validation, a provider model was unavailable, or a resource limit was hit
  • During running — the deployment crashed due to a persistent error (rare; typically an infrastructure issue)

What to do when a deployment fails:

  1. Click the failed deployment to open the detail view.
  2. Read the Error message — it describes the specific failure.
  3. For Actor deployments, the error message identifies the agent or field that caused the failure.
  4. Fix the underlying issue (update the Actor YAML, resolve the provider credential problem, etc.).
  5. Click Restart to attempt the deployment again.

If the deployment fails repeatedly with the same error after you believe you have fixed the underlying issue, contact support with the deployment ID and error message.

Transition reference

FromToTriggerNotes
pendingUser deploys a model/ActorAutomatic on deploy action
pendingrunningProvisioning completesAutomatic
pendingfailedError during provisioningAutomatic
runningstoppingUser clicks StopDraining begins
runningfailedRuntime crashRare; check error in detail view
stoppingstoppedAll in-flight requests completeAutomatic
stoppedpendingUser restarts deploymentAutomatic on restart action
failedpendingUser restarts deploymentAutomatic on restart action

Health checks

CleverThis runs periodic health checks on running deployments:

  • Provider model endpoints are checked by sending a minimal test request every 60 seconds. If 3 consecutive checks fail, the deployment is automatically moved to failed.
  • Actor endpoints are checked by validating the YAML definition and confirming all referenced provider models are still reachable every 5 minutes.

Health check failures appear in the deployment detail view under Recent Events. You can also see the last successful health check timestamp in the deployment row.

If an auto-failed deployment's underlying cause has resolved (e.g. a provider outage ended), click Restart to bring it back to running.

Deployment events log

The Events tab in the deployment detail view shows a timestamped history of every state transition:

EventDescription
deployedDeployment requested by a user
provisioning_startedCleverThis began loading the Actor/model
runningEndpoint became live
stop_requestedUser clicked Stop
drainingDraining in-flight requests
stoppedAll in-flight requests completed; endpoint removed
restart_requestedUser clicked Restart
health_check_failedPeriodic health check failed (shows count)
auto_failedMoved to failed after repeated health check failures
errorSpecific error message from provisioning or runtime

Events are retained for 90 days.