(spec: str)
| 11 | |
| 12 | |
| 13 | def get_agent_class(spec: str) -> type[Agent]: |
| 14 | full_path = _AGENT_MAPPING.get(spec, spec) |
| 15 | module_name, class_name = full_path.rsplit(".", 1) |
| 16 | module = importlib.import_module(module_name) |
| 17 | return getattr(module, class_name) |
| 18 | |
| 19 | |
| 20 | def get_agent(model: Model, env: Environment, config: dict, *, default_type: str = "default") -> Agent: |