Skip to main content

Crate terraphim_agent_supervisor

Crate terraphim_agent_supervisor 

Source
Expand description

§Terraphim Agent Supervisor

OTP-inspired supervision trees for fault-tolerant AI agent management.

This crate provides Erlang/OTP-style supervision patterns for managing AI agents, including automatic restart strategies, fault isolation, and hierarchical supervision.

§Core Concepts

  • Supervision Trees: Hierarchical fault tolerance with automatic restart
  • “Let It Crash”: Fast failure detection with supervisor recovery
  • Restart Strategies: OneForOne, OneForAll, RestForOne patterns
  • Agent Lifecycle: Spawn, monitor, restart, terminate with state persistence

Re-exports§

pub use agent::*;
pub use error::*;
pub use restart_strategy::*;
pub use supervisor::*;

Modules§

agent
Agent trait and lifecycle management
error
Error types for the supervision system
restart_strategy
Restart strategies for supervision trees
supervisor
Supervision tree implementation

Structs§

AgentPid
Unique identifier for agents in the supervision system
InitArgs
Agent initialization arguments
SupervisorId
Unique identifier for supervisors

Enums§

AgentStatus
Agent execution state
ExitReason
Reasons for agent termination
SystemMessage
System messages for agent supervision
TerminateReason
Reasons for agent termination in supervision context

Type Aliases§

SupervisionResult
Result type for supervision operations