Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion canyonos_core/controller/local_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,12 @@ def _load_agent(self):
)
return None

agent_module_name = self.agent_file.replace(".py", "")
# Use a dotted module name (e.g. "agents.aml_agent", not "agents/aml_agent")
# so importlib derives __package__ correctly and package-relative imports
# inside nested entrypoints (e.g. `from .prompts import PROMPT`) resolve.
agent_module_name = (
self.agent_file.replace(".py", "").replace(os.sep, ".").replace("/", ".")
)

# We assume the agent file is in the same directory as the local controller (e.g. copied by Docker)
# or in the current working directory.
Expand Down
Loading