MCPcopy Index your code
hub / github.com/AI45Lab/Code / register_worker

Method register_worker

core/src/subagent.rs:615–619  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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>

Calls 3

into_agent_definitionMethod · 0.80
registerMethod · 0.45
cloneMethod · 0.45