Skip to content
Merged
Show file tree
Hide file tree
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
12 changes: 0 additions & 12 deletions src/praisonai/praisonai/agents_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,9 +391,6 @@ def _prepare_for_run(self, config):
from .observability.hooks import init_observability
init_observability(adapter.name)

# Also initialize AgentOps if configured (separate from general observability)
self._init_observability(adapter.name)

# Run adapter setup hooks
adapter.setup(framework_tag=adapter.name)

Expand Down Expand Up @@ -438,15 +435,6 @@ def _select_framework(self, framework: str, config: Dict[str, Any]) -> Any:

return resolved_adapter

def _init_observability(self, framework: str) -> None:
"""Initialize observability tools if configured.

Args:
framework: The framework name for tagging
"""
# AgentOps initialization is handled in observability/hooks.py to avoid duplication
pass

def _validate_cli_backend_compatibility(self, config, framework):
"""Validate that cli_backend and runtime are only used with compatible frameworks."""
# Check if any agent/role defines cli_backend or runtime
Expand Down
26 changes: 18 additions & 8 deletions src/praisonai/praisonai/cli/features/sandbox_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,15 @@ def run(
registry = SandboxRegistry.default()
try:
sandbox_class = registry.resolve(sandbox_type)
except ValueError:
# Fallback to subprocess for unknown types
sandbox_class = registry.resolve("subprocess")
sandbox_type = "subprocess" # Update to match resolved type
except ValueError as e:
# Don't silently downgrade. Fail loud, give a fix-it hint.
print(
f"Error: sandbox '{sandbox_type}' is unavailable: {e}\n"
f"Available: {registry.list_names()}\n"
f"To install the optional backend: pip install \"praisonai[{sandbox_type}]\"\n"
f"Or explicitly choose another sandbox: --sandbox-type subprocess"
)
sys.exit(2)

# Pass image parameter only for Docker sandbox
if sandbox_type == "docker":
Expand Down Expand Up @@ -113,10 +118,15 @@ def shell(
registry = SandboxRegistry.default()
try:
sandbox_class = registry.resolve(sandbox_type)
except ValueError:
# Fallback to subprocess for unknown types
sandbox_class = registry.resolve("subprocess")
sandbox_type = "subprocess" # Update to match resolved type
except ValueError as e:
# Don't silently downgrade. Fail loud, give a fix-it hint.
print(
f"Error: sandbox '{sandbox_type}' is unavailable: {e}\n"
f"Available: {registry.list_names()}\n"
f"To install the optional backend: pip install \"praisonai[{sandbox_type}]\"\n"
f"Or explicitly choose another sandbox: --sandbox-type subprocess"
)
sys.exit(2)

# Pass image parameter only for Docker sandbox
if sandbox_type == "docker":
Expand Down
Loading
Loading