Page:
Agent Lifecycle
Pages
Agent Lifecycle
Architecture Overview
Building Blocks
Capabilities Reference
Capability Contract
Capability Spec
Comm Gateway
Core Ontology
Creating an Agent
Filesystem Capability
Hierarchical Messaging Contract
Home
Messaging Contract
Orchestrator and Control Plane
Security Architecture
Segmented Persistence Forensic Traceability
VOXAgent
VOXApiServer
VOXCapability
VOXMessage
VOXOrchestrator
VOXRole
Versioning
War Room
WhatsApp Setup
No results
1
Agent Lifecycle
jfabian edited this page 2026-08-13 11:15:47 -03:00
Agent Lifecycle
The agent state machine is defined in vox/agents/lifecycle.py via the
AgentState enum. VOX uses nine states with explicitly validated
transitions (can_transition_to()).
States
class AgentState(Enum):
BOOTING = auto() # Capability initialization
IDLE = auto() # Ready but not active
ACTIVE = auto() # Operational, processes events
PAUSING = auto() # Pause transition
PAUSED = auto() # Suspended, events queued
RESUMING = auto() # Resume transition
STOPPING = auto() # Stop transition
STOPPED = auto() # Terminated
FAILED = auto() # Irreversible boot error
Allowed transitions
| From | To |
|---|---|
BOOTING |
IDLE, ACTIVE, FAILED, STOPPING |
IDLE |
BOOTING, STOPPING |
ACTIVE |
PAUSING, STOPPING |
PAUSING |
PAUSED, STOPPING |
PAUSED |
RESUMING, STOPPING |
RESUMING |
ACTIVE, STOPPING |
STOPPING |
STOPPED |
STOPPED |
BOOTING |
FAILED |
BOOTING |
Lifecycle operations
| Method | Effect |
|---|---|
agent.boot() |
IDLE → BOOTING → ACTIVE (or FAILED). Injects vault secrets, initializes store/memory DBs, boots each capability, emits on_boot. |
agent.pause() |
ACTIVE → PAUSING → PAUSED |
agent.resume() |
PAUSED → RESUMING → ACTIVE; drains the queued-event buffer |
agent.stop() |
ACTIVE/PAUSED/IDLE → STOPPING → STOPPED; cancels agent tasks |
agent.shutdown() |
Full teardown: cancel tasks, cap.shutdown() on every capability, clear roles/capabilities |
Paused event buffering
While an agent is PAUSED, emitted events are buffered in a bounded
EventQueue (capacity 256). On resume, buffered events are drained and
dispatched. If the buffer is full, new events are dropped (counted via
dropped).
Boot failure
A capability that fails to boot, a vault access error, or missing required
params moves the agent to FAILED. Agents with missing capabilities or
SENSITIVE_PARAMS are flagged DEGRADED (see
VOXAgent and Capabilities Reference).
Overview
- Home
- Versioning
- Architecture Overview
- Building Blocks
Agent Model
- VOXAgent
- Agent Lifecycle
- VOXRole
- Creating an Agent
Capabilities
- VOXCapability
- Capabilities Reference
- Capability Contract
- Comm Gateway
- WhatsApp Setup
Messaging
- VOXMessage
- Messaging Contract
- Hierarchical Messaging Contract
- The War Room
Orchestrator & Control Plane
- VOXOrchestrator
- Orchestrator & Control Plane
- VOXApiServer
Persistence & Forensics
- Segmented Persistence & Forensic Traceability
Security & Governance
- Security Architecture
- Core Ontology (legacy)
- Capability Specification (legacy)
Status: v0.5.4