naas_abi_core.services.agent.Agent.Agent (base class for agents)
naas_abi_core.utils.Logger.logger (debug logging)
Standard library: importlib, os
Usage
from naas_abi_core.module.ModuleAgentLoader import ModuleAgentLoader# Any class from the target package/module; used to locate <module_root>/agentsfrom my_package.my_module import SomeClassagents = ModuleAgentLoader.load_agents(SomeClass)for agent_cls in agents: print(agent_cls.__name__) # If the agent module defined create_agent, agent_cls.New will be set.
Caveats
Only loads from .py files in the agents/ directory; ignores files ending with test.py.
Only agent classes whose top-level package matches class_ are collected.
The New attribute injection depends on create_agent existing in the agent module; no validation of its signature is performed.