MCPcopy
hub / github.com/crewAIInc/crewAI / remove_crew

Method remove_crew

lib/cli/src/crewai_cli/deploy/main.py:633–658  ·  view source on GitHub ↗

Remove a crew deployment. Args: uuid (Optional[str]): The UUID of the crew to remove.

(self, uuid: str | None)

Source from the content-addressed store, hash-verified

631 self._display_logs(response.json())
632
633 def remove_crew(self, uuid: str | None) -> None:
634 """
635 Remove a crew deployment.
636
637 Args:
638 uuid (Optional[str]): The UUID of the crew to remove.
639 """
640 self._telemetry.remove_crew_span(uuid)
641 console.print("Removing deployment...", style="bold blue")
642
643 if uuid:
644 response = self.plus_api_client.delete_crew_by_uuid(uuid)
645 elif self.project_name:
646 response = self.plus_api_client.delete_crew_by_name(self.project_name)
647 else:
648 self._standard_no_param_error_message()
649 return
650
651 if response.status_code == 204:
652 console.print(
653 f"Crew '{self.project_name}' removed successfully.", style="green"
654 )
655 else:
656 console.print(
657 f"Failed to remove crew '{self.project_name}'", style="bold red"
658 )

Callers 2

deploy_removeFunction · 0.95
test_remove_crewMethod · 0.80

Calls 5

delete_crew_by_uuidMethod · 0.80
delete_crew_by_nameMethod · 0.80
remove_crew_spanMethod · 0.45
printMethod · 0.45

Tested by 1

test_remove_crewMethod · 0.64