Register a disposable worker agent from a reproducible spec. Returns the compiled [`AgentDefinition`] so callers can inspect or pass it directly to `session_for_agent`.
(&self, spec: WorkerAgentSpec)
| 613 | /// Returns the compiled [`AgentDefinition`] so callers can inspect or pass it |
| 614 | /// directly to `session_for_agent`. |
| 615 | pub fn register_worker(&self, spec: WorkerAgentSpec) -> AgentDefinition { |
| 616 | let agent = spec.into_agent_definition(); |
| 617 | self.register(agent.clone()); |
| 618 | agent |
| 619 | } |
| 620 | |
| 621 | /// Register multiple disposable worker agents and return their definitions. |
| 622 | pub fn register_workers<I>(&self, specs: I) -> Vec<AgentDefinition> |