MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / register

Method register

atomic-agent/src/hooks/mod.rs:313–317  ·  view source on GitHub ↗

Register a new agent adapter. If an agent with the same name is already registered, the new one replaces it.

(&mut self, agent: Box<dyn AgentHook>)

Source from the content-addressed store, hash-verified

311 /// If an agent with the same name is already registered, the new one
312 /// replaces it.
313 pub fn register(&mut self, agent: Box<dyn AgentHook>) {
314 // Replace existing agent with the same name
315 self.agents.retain(|a| a.name() != agent.name());
316 self.agents.push(agent);
317 }
318
319 /// Look up an agent adapter by name.
320 ///

Calls 2

nameMethod · 0.45
pushMethod · 0.45