docs: add missing docs
ref: N25B-115
This commit is contained in:
@@ -22,10 +22,22 @@ class AgentDirectory:
|
||||
|
||||
@staticmethod
|
||||
def register(name: str, agent: "BaseAgent"):
|
||||
"""
|
||||
Registers an agent instance with a unique name.
|
||||
|
||||
:param name: The name of the agent.
|
||||
:param agent: The :class:`BaseAgent` instance.
|
||||
"""
|
||||
_agent_directory[name] = agent
|
||||
|
||||
@staticmethod
|
||||
def get(name: str) -> "BaseAgent | None":
|
||||
"""
|
||||
Retrieves a registered agent instance by name.
|
||||
|
||||
:param name: The name of the agent to retrieve.
|
||||
:return: The :class:`BaseAgent` instance, or None if not found.
|
||||
"""
|
||||
return _agent_directory.get(name)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user