There is a need for legislation and regulations to ensure AI safety and put guardrails in place, said state Sen. Jerry McNerney, who represents the Pleasanton area and authored Senate Bill 813.