| import json | |
| from pathlib import Path | |
| def _load_params() -> dict: | |
| params_path = Path(__file__).with_name("params.json") | |
| if not params_path.exists(): | |
| return {} | |
| with params_path.open("r", encoding="utf-8") as handle: | |
| data = json.load(handle) | |
| return data if isinstance(data, dict) else {} | |
| def get_agent_params(agent_name: str) -> dict: | |
| params = _load_params().get(agent_name, {}) | |
| return params if isinstance(params, dict) else {} | |