# SimpleElasticAgent Source: https://www.tensorplay.cn/docs/generated/tensorplay.distributed.elastic.agent.server.SimpleElasticAgent.html ```python class tensorplay.distributed.elastic.agent.server.SimpleElasticAgent(spec: WorkerSpec | None = None, exit_barrier_timeout: float = 300, shutdown_timeout: int = 30) ``` Reusable agent run loop over one worker group. ```python run(role: str = 'default') → RunResult ``` Run the agent to a terminal state, shutting down on any exit path.