diff --git a/.codex/skills/agentopt/SKILL.md b/.codex/skills/agentopt/SKILL.md index cf99bfc..8f792f4 100644 --- a/.codex/skills/agentopt/SKILL.md +++ b/.codex/skills/agentopt/SKILL.md @@ -69,7 +69,7 @@ results.export_config("artifacts/best_config.yaml") print("best:", results.get_best_combo(), "cost:", results.selection_cost) ``` -A working fuller version lives at `examples/custom_agent_example.py`. +A working fuller version lives at `examples/selection/local/custom_agent.py`. --- diff --git a/src/agentopt/routing/config.py b/src/agentopt/routing/config.py index b7f199c..fd1bda8 100644 --- a/src/agentopt/routing/config.py +++ b/src/agentopt/routing/config.py @@ -66,7 +66,9 @@ def _resolve_class(policy: str) -> Type[Router]: except ImportError as exc: raise ValueError( f"Could not import routing policy module {module_name!r}: {exc}. " - "Custom routers must be importable on the daemon's PYTHONPATH." + f"Restart the daemon with `agentopt serve --policy-module " + f"path/to/{module_name}.py` so the file is pre-imported, or put " + "its parent directory on the daemon's PYTHONPATH before starting." ) from exc try: cls = getattr(module, class_name)